Recent Posting
Getting Apache 2.2 to work with PHP 5
What I will do though is to highlight the small changes I made to make Apache 2.2 work with PHP 5.
Assuming PHP is installed in the C:/php folder normally you would add the following lines to your Apache httpd.conf file:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# configure the path to php.ini
PHPIniDir "C:/php"
With Apache 2.2 I got an error on the LoadModule line. To resolve that error I had to download the latest stable release of PHP from the PHP Snapshots site. I downloaded the zip file for PHP 5.2 and this comes with the php5apache2_2.dll file.
In the Apache httpd conf file I then made changes to the LoadModule line as follows:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# configure the path to php.ini
PHPIniDir "C:/php"
and this solved the problem. I prefer using the PHPIniDir directive because this means I
just maintain one copy of the php.ini file in C:/php folder in this case and I don't have to
copy another one to C:/Windows for example and this works fine for me.



delicious
digg
