Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

PHP for desktop PC

Thread Tools
 
Search this Thread
 
Old 31 May 2007, 02:59 PM
  #1  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default PHP for desktop PC

Hello

(iIm not technical)

I'm hacking together a website that has been built in PHP (happy doing the HTML bit). I want to run the site locally on my PC before I put it live. However as my PC doesn't have a PHP thingy it doesn't work very well 9include files don't work etc).

Is there something I can install that will make it work locally?

Thanks

Mark
Old 31 May 2007, 03:43 PM
  #2  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

Is your PC running as a webserver? If not then you'll need to get it to do that first, then you can add in PHP.

Where to get PHP? Try here for the windows binaries. Have a look here for the windows install guide for PHP.
Old 31 May 2007, 03:49 PM
  #3  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

easiest option is to download ApacheTriad and it will install it all for you and set it up perfectly.

Apache2Triad Net

This will set up apache, PHP, MYSQL and phpmyadmin too. Really simple to use too
Old 31 May 2007, 03:51 PM
  #4  
stevebennett
Scooby Regular
 
stevebennett's Avatar
 
Join Date: May 2006
Posts: 379
Likes: 0
Received 0 Likes on 0 Posts
Default

If you have XP Pro and IIS installed you can just install PHP 5 from PHP: Downloads

and it should work out of the box.

Steve

BUt appache is another good option
Old 31 May 2007, 04:05 PM
  #5  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

Thanks guys

What a lovely place Scoobynet is.
Old 01 June 2007, 04:39 PM
  #6  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

Hmm

Installed IIS and PHP on my machine but it still doesn't recognise PHP files. If I type in something like http://localhost/myweb/index.php. It just asks me where I want o save it

Any ideas?

Mark
Old 01 June 2007, 04:43 PM
  #7  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

do the apachetriad thing and you wont have to amend or change anything - just run the setup file and all done for you.

sounds like you have to edit the PHP.INI file which will probably be in C:PHP or something to recognise php files as files to parse and present as html rather than a file download type.

apachetriad is soooo much easier.
Old 01 June 2007, 05:21 PM
  #8  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

I'll give it a go
Old 01 June 2007, 05:31 PM
  #9  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

5 min job and you will be writing your "hello world" script before you know it
Old 04 June 2007, 09:35 AM
  #10  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

Right installed Apache2Triad but I can't view any files. When trying to access http://localhost/apache2triadcp/test.php it asks for authenitcation. What do I type in? I've tried the normal PC logon username/password and the password I set up during install but nothing works. Any idea what I'm doing wrong??

Thanks

Mark
Old 04 June 2007, 09:59 AM
  #11  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

have you read the manual - the username and password are in there.
Old 04 June 2007, 10:30 AM
  #12  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

It says

"You will be prompted for username and password. Default user and is root "

what does that mean?

PS I'll buy you a beer at the next Cambridge meet
Old 04 June 2007, 10:35 AM
  #13  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

type in 'root'
i think the std password is either blank or 'apache2triad'

You shouldnt really need to access this control panel though.

You create subdirectories under the:
C:\program files\apache_something or other\htdocs folder

eg create one called \mysite and you can access it in a web browser by going to: localhost/mysite
Old 04 June 2007, 11:26 AM
  #14  
MarkCSC
Scooby Regular
Thread Starter
 
MarkCSC's Avatar
 
Join Date: Apr 1999
Location: Surferk
Posts: 2,464
Likes: 0
Received 0 Likes on 0 Posts
Default

Thanks so much for your time. It all works perfectly :-)

I better go and write some code now!!


Thanks again

Mark
Old 04 June 2007, 11:44 AM
  #15  
dynamix
Former Sponsor
iTrader: (3)
 
dynamix's Avatar
 
Join Date: Feb 2006
Location: near you
Posts: 9,708
Likes: 0
Received 3 Likes on 3 Posts
Default

<?php

echo "no problem chap";

?>




All times are GMT +1. The time now is 12:07 PM.