Install PHP on Windows XP

October 24, 2008 · Print This Article

For those of you wanting to run/test PHP code on your own machine, or on a machine on your local network, this one is for you. First off, you would had to have installed the Internet Information Services (IIS). If you have not done so, please go here.

1. Let’s install PHP Version 5. Go here: http://www.php.net/downloads.php#v5. Dowload the file called PHP 5.2.6. installer. As of this writing, that was the latest stable version. It can be called different, but just make sure it is the installer. Run it.

2. Click on Next. Click on Accept and Next. Change C:\Program Files\PHP\ to just C:\PHP\.

3. Select IIS CGI. Cick on Next. On “Choose Items to Install”, for now let’s leave all as is. Click on Next. Click on Install. Click on Finish.

4. Download this file, right click->save as -phptest.php- and save it to this path: C:\Inetpub\wwwroot. Open your browser and type the following: http://localhost/phptest.php. You should get something like this:

5. Done. But I will add some steps so this computer can be seen within your local network and not only within you local box.

6. Go to Start -> Settings -> Control Panel. Click on Windows Firewall.

7. On the Exceptions tab, Click on Add Port… Name: HTTP, Port Number: 80.

8. Click Ok. Ok again. Now open a browser in another machine within the network and type the following address: http://machinename/phptest.php (machinename should be changed to the name of the computer hosting the web server and php).

Share/Save/Bookmark

Comments

Got something to say?

You must be logged in to post a comment.