Installing PHP 5 in Windows XP is not hard at all. There are so many ways to do it but here we are going to do it in pretty easy way. You will able to setup PHP 5 in your Computer within 10 minutes. First let’s see what you need.
01. A computer which runs Windows XP
02. Apache Web Server ( If you don’t have it installed already here’s a guide )
03. PHP 5.2.6 zip package ( Windows binary )
That’s all you need! You can get configured PHP with Apache without any pre-knowledge with this tutorial. To make things easy All steps have screen prints, So you can understand things clearly.

Now go to php.ini file again and tell it where it can find its extension folder. Use the Find Next option to find “extension_dir” and change the pat to “c:\php\ext”

12 Installing PHP 5 in windows XP
Download PHP zip package from www.php.net . Go to the site and click on link called “Downloads“. Click on “ PHP 5.2.6 zip package ” link under “Windows Binaries”. Download It and unzip the content.

00 Installing PHP 5 in windows XP

Now copy the folder “php-5-26-win32” into C drive of your hard drive. Then rename it as “php”.

011 Installing PHP 5 in windows XP

02 Installing PHP 5 in windows XP

Now you have to make a virtual host folder to put your php files and web pages. Make a folder named “web” in your C drive. You can see the folder “web” in above screen shot.

Now go to the Apache folder (C:\apache) and go to the sub folder “conf”. Open the file called “conf” in notepad. Click on top of the page then go to edit menu and click “Find Next”. Insert word “DocumentRoot”. And click on “Find Next” button. You will find the word in page highlighted. There change the path to C:/web as screen shop shows (below)

04 Installing PHP 5 in windows XP

Now restart Apache (Click on Apache Monitor icon on system tray and select restart). Go to your favorite web browser (Firefox, Opera or whatever) Write http://127.0.0.1/ on address bar and click enter. If you see a page then your virtual folder is working! (I forgot to tell make an html page and name it has index.html and put it in folder called “web” in your C drive). If everything ok you will see the content of that html page on your browser.

05 Installing PHP 5 in windows XP

Now in PHP folder find the file called “php.ini-dist”, move it to the Windows folder and rename it as “php.ini”.

06 Installing PHP 5 in windows XP

07 Installing PHP 5 in windows XP

Now you have to tell PHP how to find the vertual folder. Open the php.ini file in notePad and find “doc_root”(you can use the Find Next option in Note pad to find it). Edit it as this “ doc_root=”C:/web” ”.

08 Installing PHP 5 in windows XP

Now go to Apache folder then to conf folder and open httpd.conf file again. There copy and paste 2 lines where screen shot shows.

LoadModule php5_module “c:/php/php5apache2_2.dll”
AddType application/x-httpd-php .php

09 Installing PHP 5 in windows XP

Now you have to add .php extension to Apache server. In same file ( httpd.conf ), use Find Next option to locate “DirectoryIndex” directive. There add “ index.php “ after “ index.html” as shown below.

11 Installing PHP 5 in windows XP

Now go to php.ini file again and tell it where it can find its extension folder. Use the Find Next option to find “extension_dir” and change the pat to “c:\php\ext”

121 Installing PHP 5 in windows XP

Now restart Apache! And if it restarted without problem then you have PHP installed and configured in your computer. Sometimes you might need to restart the computer before things start work. If Apache is giving you an error message then follow all steps again and see if anything has gone wrong.
Last step. If Apache is working fine now open black note Pad page and save it as info.php in your virtual host folder (C:\web) make sure you select Save as type as “all” when you save the file. Now on it write this and save again.

Now open your web browser and type http://127.0.0.1/info.php. If you can see the page below then your installation is successful!

13 Installing PHP 5 in windows XP