Installing PHP under Windows - Installation Cont'd - PHP
(Page 5 of 6 )
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
Open the file httpd.conf in notepad. Httpd.conf can be found in: C:\Program Files\Apache Group\Apache2\conf\; 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 part yet, test to make sure it works!
Test PHP
To test that 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, take note of any errors and makes sure you haven’t missed any of the instructions above.
Restart Apache
For all the changes to take effect, and Apache to recognize PHP, Apache must be restarted. To do this click ‘Start > All Programs > Apache > Control > Restart’.
Next: Testing It All >>
More Apache Articles
More By Matthew Phillips