PHP Installation Tutorial 1 - Installing WAMP! - Page 4 of 5
Install PHP
Create the directory C:\php and extract all files in the php zip file here. You
will now need to copy some files to your apache Directory (C:\Program Files\Apache
Group\Apache2\)
Copy the following files:
C:\php\php4ts.dll C:\php\sapi\php4apache2.dll C:\php\php.ini-recommended
Rename ‘php.ini-recommended’ to ‘php.ini’ and open it in notepad. Search for 'doc_root'
until you find the line:
doc_root =Change this line to:
doc_root = C:\Program Files\Apache Group\Apache2\htdocs
Go to the directory 'C:\Program Files\Apache Group\Apache2\conf\'.
Open the file httpd.conf in notepad.
Add the following lines to the end of the file:
LoadModule php4_module php4apache2.dll
AddType application/x-httpd-php .php
Congratulations you have just installed PHP on your computer! But don’t start the party yet, test if it works!
Test PHP
To test the PHP has been correctly installed click ‘Start > All Programs > Apache > Configuration > Test Configuration’. A console window should show briefly then disappear, if this happens then everything is ok, it if stays then take note of any errors and makes sure you followed all the instructions above.
Reset Apache
For all the changes to take effect, and Apache to recognise PHP, Apache must be restarted. To do this click ‘Start > All Programs > Apache > Control > Restart’.
