A quick guide to installing Apache and PHP on Windows XP.
-
Setup PHP
- Download PHP from php.net. If you want the latest stable version then it’s currently the PHP 4.3.7 zip package (6,895Kb). Unpack to a folder - say, C://PHP
- Copy all the dlls in C://php/dlls to C://WINDOWS/SYSTEM32
- Copy C://php/php4ts.dll to C://WINDOWS/SYSTEM32
- Copy C://php/php.ini-dist to C://WINDOWS and rename it php.ini
- Edit C://WINDOWS /php.ini and change the
extension_dirline to read:extension_dir = "C:/php/extensions"
-
Setup Apache
- Download Apache from apache.org. You’ll want the Win32 Binary (MSI Installer). Run the installer, take the defaults.
- Open the Apache config file C:// Program Files/ Apache Group/ Apache2/ conf/ httpd.conf in notepad
-
Find the section with lots of ‘LoadModule’ directives and at the end of that section add another line that reads:
LoadModule php4_module c:/php/sapi/php4apache2.dll -
Find the line that says:
DirectoryIndex index.html
and change it to read
DirectoryIndex index.php index.html -
Find the section that has a line like this:
#AddType application/x-tar .tgz
and insert after it this line :
AddType application/x-httpd-php .php
Restart Apache and you’re done. There’s a lot more to configure in a development environment but this will get you up and running.








One Comment
this was helpful this was helpful