Apace Webserver 2.0.46 problem!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Apace Webserver 2.0.46 problem!

Post by ampersand »

Hi!

I've just installed apache webserver 2.0.46 at my computer and I have also added these lines to the "httpd-conf" file:
# Load php module
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
But when I restart apache after adding these lines it won't start.. Can someone help me ?

Thanks in advance
ampersand
Last edited by ampersand on Sat Jun 07, 2003 11:43 am, edited 1 time in total.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

which version of windows?
Do message boxes popup? If, what do they tell you about the error?
Did you take a look at both the webserver's logfile and the systems eventlog?
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Post by ampersand »

I'm using Windows XP pro.
When starting from the system tray it says: "The requested operation has failed!"

When started from My Computer>manage>services and applications> services it says:

"Windows could not start the Apache2 on Local Computer. For more information, review the system event log. If this is a non-microsoft service, contact the service vendor, and refer to the service-spesific error code 1."
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

so take a look at the system event log.
You'll find something like
The Apache service named reported the following error:
>>> Syntax error on line 58 of C:/Programme/Apache Group/Apache2/conf/httpd.conf: .
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Post by ampersand »

Sorry I forgott to say that I have and this is what it says :
Description:
The Apache service named reported the following error:
>>> Cannot load C:/php/sapi/php4apache into server: The specified module could not be found. .
I have checked the path to this dll file several times and it is correct!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you need the php4apache2.dll module (since you're using Apache 2.0.46)
Also note the paragraph in install.txt that starts with
The precise dlls involved depend on which web server you use and whether you want to run php as a cgi or as a server module. php4ts.dll is always used
So you have to make sure php4ts.dll can be found by the process that loads php4apache2.dll by either copying that .dll to one of the system directories or to the exec-dir of the process or by adding the location (directory) to the environment variable PATH
(I prefer PATH but that's a matter of opinion)
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Post by ampersand »

php4ts.dll is in the c:\php and c:\windows\system32 but it still wont work. I just tried with an older version of apache and that works!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

But you also tried php4apache2.dll for apache2? ;)

Code: Select all

# Load php module
LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Post by ampersand »

yes I did. Its quite funny that it wont work.. I'm using apache 1.3.26 now with the same lines (phpapache4.dll) and it works.
Post Reply