I am assuming that you have downloaded and installed Apache 2.x on your windows machine. Use the latest version 2.2, if you do not have plans to run Subversion on it. Otherwise choose Apache 2.0.x. Install it with the defaults. You may want to however changes the drive on which it is installed. Anyway so you have it running. Then you went to php.net and have downloaded and extracted the zip file to say c:\ or d:\. I am assuming you have then changed the name of php.ini-recommended to php.ini. So far all the steps are straight forward and their install guide is good enough. Now you are feeling happy about it and want to integrate PHP with Apache, right? That's when the fun begins.

To cut the long story short the instructions in PHP document doesn't work and have obviously not been updated in a long while. So I will give you a 2 minute guide to glory.

Open httpd.conf (in Drive:\Program Files\Apache Group\Apache2\conf) and search for LoadModule statements. At the end add:
LoadModule php5_module "D:/php/php5apache2.dll"

Then search for directives. At the end add:


	AddType application/x-httpd-php .php
	AddType application/x-httpd-php-source .phps

Note: The last AddType is a nicety. It allows you to view .phps files (php files with extension renamed) in htmlized and colorful format from your browser.

Now restart the server.
Did I say you are done? Well, you are. So go out and enjoy.

Note: If you are a wimp and you don't need Subversion you may take the easy way out and install Xampp instead. It will do the dirty work for you.