Configuring PHP in Apache 2 in Windows


Install php and crate a dir in c:\php

and copy the unzipped file there

Copy all the dll's under php to c:\windows\system32

reanme php.ini-dist to php.ini and put it in path c:\windows for example

Also in php.ini add support to mysql

"As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext"

In the Apache httpd.conf

#ExtendedStatus On


LoadModule rewrite_module modules/
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4

Then set permission to
# This should be changed to whatever you set DocumentRoot to.

Options Indexes Includes FollowSymLinks MultiViews ExecCGI

AllowOverride All

Note - check the security risk here

Also note remove .php from AddHandler, otherwise you get errors from apache saying error 403 Forbidden

ScriptAlias /cgi-bin/ "D:/Program Files/Apache Group/Apache2/cgi-bin/"
AddHandler cgi-script .cgi .pl


Popular posts from this blog

Long running Java process resource consumption monitoring , leak detection and GC tuning

OpenLayers Advanced Clustering and Setting dynamic images for OpenLayer Styles via Ajax

Best practises - Selenium WebDriver/ Java