Very important: Rename this file to php.ini. Windows will tell you that changing the extension will make it unusable - Ignore the message and continue - [Slide 5].
Gear up to make some changes to this file- check the screenshots from the slideshow as you go along.
Locate the "LoadModule section" (Tip: use the Find feature or the Ctrl-F key combination). Add the following line - [Slide 7]LoadModule php5_module "c:/PHP/php5apache2_2.dll"
Note: If you have chosen to install PHP is a different folder and not C:/PHP, you have to change the path in the above line.
Find the "AddType" section and put in the line below - [Slide 8].AddType application/x-httpd-php .php
Note: You can also use other file extensions for PHP like .php3 or .php4 - simply add them at the end of the above line separated by a blank space.
Move to the end of the httpd.conf file and add the line below - [Slide 9]PHPIniDir "C:/PHP"
Note: This tells the Apache web server the location of the PHP configuration file - php.ini.
If you've read my instructions on installing Apache on Windows7 know that all web site files are to be kept in the htdocs folder located under the Apache install directory. This means when you load http://localhost, Apache checks the htdocs folder - the "It works" file that's displayed the first time you test Apache installation is actually the index.html file in this folder.
In accordance to my habit of having things organized, I like to keep web site files in their own folder away from Apache program and configuration files... something like C:/websites. The good news is that Apache allows you to make such a change pretty easily and to do this, you need to specify this new directory path as the document root.
First create a folder for your web site files - C:/websites is what I use and is a nice choice. Find the DocumentRoot "C:/Apache/htdocs" in the Apache configuration file and change it to DocumentRoot "C:/websites" - [Slide 10].
Lastly, change <Directory "C:/Apache/htdocs"> to <Directory "C:/websites"> - [Slide 11].
IMPORTANT: By default, Notepad will save the file as .txt. So you need to select "All Files" from the "Save as type" drop down and enter the full file name in the "File name" field. Confused? Check the screenshot - [Slide 13].