We need to edit the httpd.conf in C:\ server\Apache\conf to make sure that Apache knows where is php modules.
Step 1:
Add the following lines at the end of httpd.conf.
LoadModule php5_module “C:/server/php/php5apache2_2.dll”
PHPIniDir “C:/server/php/”
AddType application/x-httpd-php .php
Step 2:
Find this line in httpd.conf.
DirectoryIndex index.html
and add:
DirectoryIndex index.html index.php
Step 3:
Find this line in httpd.conf.
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from None
Change this to:
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Step 4:
Find this line in httpd.conf.
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
Change this to:
AllowOverride All
Step 5:
Find and remove # at the beginning from the following lines
#LoadModule rewrite_module modules/mod_rewrite.so
#ServerName localhost:80
Step 6:
Now create a file php phpinfo, and add the following in the text field:
and save as phpinfo.php and Place this file in the root of your server C:\server\Apache2\htdocs.
Well that is it we setup now PHP in windows.


