Question

I'm trying to configure apache 2.2 for php 5.2 (or preferably 5.3, but php.net seems to say not to) on Windows Server 2008.

C:\Apache2.2\ C:\php\v5.2\

Apache is running fine before I add this to httpd.conf

LoadModule php5_module "C:/php/v5.2/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php/v5.2/"

Then apache spits out this error when I try to restart it from cmd:

httpd.exe: Syntax error on line 129 of httpd.conf: Cannot load C:/php/v5.2/php5apache2_2.dll into server: The specified module could not be found.

It's definitely there!

I googled the error and found a lot of people complaining of it, but they're all for mistakes like referencing php5apache2.dll instead of php5apache2_2.dll.

EDIT: btw, when I use the installer, and it modifies httpd.conf for me, I still get the cannot find error during start up. wtf…

Was it helpful?

Solution

turns out the LoadModule […] has to go at the very end of httpd.conf. dunno why, but i moved it, and apache stopped complaining.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top