Forum Moderators: phranque

Message Too Old, No Replies

Setting up PHP5 with Apache2 on Windows XP

httpd.conf error

         

Elliott Hird

10:24 am on May 24, 2006 (gmt 0)

10+ Year Member



I added below all the LoadModule lines:

PHPIniDir "C:/server/php"
LoadModule php5_module "C:/server/php/php5apache2.dll"
AddType application/x-httpd-php .php

But the server won't start. httpd -t output:

httpd: Syntax error on line 117 of C:/server/apache/conf/httpd.conf: Cannot load
C:/server/php/php5apache2.dll into server: The specified module could not be fo
und.

But it's there, the file IS there, I checked. The other LoadModule lines end in .so, though... I've installed PHP and Apache MANY times before, but I'm stuck. Help?

jdMorgan

1:14 pm on May 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Possibly because that's not a valid Windows filepath -- the slashes are reversed.

There are several tutorials on setting up PHP in the PHP forum library that you might find useful as well.

[webmasterworld.com...]
[webmasterworld.com...]

Jim

Elliott Hird

1:24 pm on May 24, 2006 (gmt 0)

10+ Year Member



I fiddled with the / and \ already, but the manual does specifically say to use /.

Elliott Hird

2:53 pm on May 25, 2006 (gmt 0)

10+ Year Member



Nobody know?

jatar_k

3:06 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



mine is like so

LoadModule php5_module C:/php/php5apache.dll

I also have an AddModule at the end of the rest of them

AddModule mod_php5.c

this is on my windows box, so it isn't just the slashes

coopster

5:40 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I've seen problems with installations, although everything else looks fine the server still fails on start. Try completely uninstalling and reinstalling the Apache server.

Elliott Hird

6:52 pm on May 25, 2006 (gmt 0)

10+ Year Member



mine is like so

LoadModule php5_module C:/php/php5apache.dll

I also have an AddModule at the end of the rest of them

AddModule mod_php5.c

this is on my windows box, so it isn't just the slashes

That's for apache 1.3.

coopster

7:04 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have an Apache2 installation on a Win box here and it is much like yours except I use AddHandler as opposed to AddType.
AddHandler php5-script php

However, that likely is not your issue. I ran into a similar issue once and the uninstall/install was the fix. Don't ask me why. Corrupt binary is what I figured ultimately as I completely started over from scratch on the
httpd.conf
file and that did not fix anything. The full removal and clean install fixed 'er up.

jatar_k

7:16 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> That's for apache 1.3

good point sorry, but the path issue would still be moot

I have had the same thing as coop, deleted everything (make sure you get everything), redownloaded, reinstalled and it just worked. Followed the exact same steps each time.

coopster

12:11 am on May 31, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Out of curiosity, is this indeed Apache2, or Apache 2.2?

Related thread:
WAMP installation problems. [webmasterworld.com]