Install PHP on Windows XP

October 24, 2008

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

Install a Web/FTP Server on Windows XP

October 24, 2008

In case you want to test you web site on your own computer, before publishing it to the web, or need to ftp files to your own personal box, you will need a Web Server or an FTP Server. By default, Windows XP won’t install its Web/Ftp Server, so let’s add the Internet Information Services (IIS), which contains a Web Server, an FTP Server, FrontPage Extensions, SMTP Service, etc. Remember to have the Windows XP’s installation CD at hand.

1. Go to Start -> Settings -> Control Panel. Click on the Add or Remove Programs icon.

2. On the left pane, click on Add/Remove Windows Components. The following window will pop up.

3. Click on Internet Information Services (IIS). Click on Details… Customize it with the services needed. Click Ok. Click on Next>.

4. Windows will ask you to insert the CD. Note that this CD needs to be the one used to do the original Windows XP installation. Click on Finish.

5. Open a web browser and type this address: http://localhost/. You should get something like this

6. Done. Now you can add a scripting language, i.e. PHP, a database, i.e. MyPHP, and you can set up an environment on where to test out complex sites.

Share/Save/Bookmark