Page 1 of 1

Reinstalling PHP/Apache -- httpd.conf syntax error [solved]

Posted: Sat Sep 02, 2006 12:31 pm
by s.dot

Code: Select all

#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so

# For PHP 5 do something like this:
LoadModule php5_module "C:/php/php5apache2.dll"              <---- LINE 117
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"
Error Message:
Apache wrote:httpd.exe: Syntax error on line 117 of C:/apache/conf/httpd.conf: Cannot load C:
/php/php5apache2.dll into server: The specified module could not be found.
Note the errors or messages above, and press the <ESC> key to exit. 20...
The path to the module is indeed C:\php\php5apache2.dll
I haven't done this for a while, so it's probably a silly error. :P

Apache 2.2.3 / PHP 5.1.6

Posted: Sat Sep 02, 2006 12:45 pm
by volka
is php5apache2.dll really compiled for apache 2.2 and not for apache 2.0?

Posted: Sat Sep 02, 2006 1:39 pm
by nickvd
copy the dll into the windows or the windows/system folder... that usually solves the problem for me...

Posted: Sat Sep 02, 2006 8:32 pm
by s.dot
volka wrote:is php5apache2.dll really compiled for apache 2.2 and not for apache 2.0?
Switching to 2.0.59 fixed this problem. ;) Thanks!

Posted: Wed Sep 20, 2006 4:51 pm
by meatwear
If you want to stick with apache 2.2 then there is a fix available: http://www.apachelounge.com/

Here's the readme from Steffen (thanks)

# binary by: Steffen
# Mail: info@apachelounge.com
# Home: http://www.apachelounge.com/
#
#
# Runs only with PHP 5.1.0-5.1.6 and Apache 2.2.0-2.2.3 !!

# Install:

- Copy php5apache2.dll to your php folder (eg. c:/php)

- Copy httpd.exe.manifest to apache2/bin

- Finally install the Visual C++ 2005 Redistributable Package (the binary is build with VC 2005).
Download it from:
http://www.microsoft.com/downloads/deta ... laylang=en



# Add to your httpd.conf

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

Note: Remember to substitute the c:/php for your actual path to PHP in the above examples.


For extra info see also : http://www.apachelounge.com/forum/viewtopic.php?t=570


Enjoy,

Steffen

Posted: Thu Sep 21, 2006 6:00 am
by volka
That's not all. You need to download the php5apache2.dll build for apache2.2 mentioned in this how-to.
http://www.apachelounge.com/download/ wrote:php5apache2.dll-php5.1.x.zip 24 Aug '06 14K
apache2handler for Apache 2.2.x and PHP 5.1.0-5.1.6
And (only) because the guy who made this (unofficial) build used visual studio 2005 and some dependencies were compiled in you need the 2005 redistributables.
[don't get me wrong, that's not bad. but it is different from "you only have to copy two files to get it working" ;)]

Re: Reinstalling PHP/Apache -- httpd.conf syntax error [solved]

Posted: Fri Apr 18, 2008 8:56 am
by beth
Hi I was having exectly the same problem I changed:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

instead and it worked fine, no idea why but it did.