php gone??

CrazyMouse

Verified User
Joined
Jul 24, 2004
Messages
53
Location
The Netherlands
I installed today direct admin, works al fine php/sql/mail.

i wanne install the mod_bandwidth.
I restart apache and get this error:


anke# httpd restart
Syntax error on line 160 of /etc/httpd/conf/httpd.conf:
Cannot add module via name 'mod_php4.c': not in list of loaded modules
anke#



and I did't remove it... How can I fix this?
 
maybe try to rebuild php from customapache?

cd /usr/local/directadmin/customeapache

./build update
./build clean
./build php

hope that helps.
 
I am actually having the same probelm with httpd as you are.

service httpd configtest
Syntax error on line 161 of /etc/httpd/conf/httpd.conf:
Cannot add module via name 'mod_php4.c': not in list of loaded modules

No system changes were made by us other than the automatic directadmin update a few days ago. But I am not sure if this is responsible for the problem or not.

I have left a message with directadmin support.

Chris.
 
I am actually having the same probelm with httpd as you are.

service httpd configtest
Syntax error on line 161 of /etc/httpd/conf/httpd.conf:
Cannot add module via name 'mod_php4.c': not in list of loaded modules

No system changes were made by us other than the automatic directadmin update a few days ago. But I am not sure if this is responsible for the problem or not.

I have left a message with directadmin support.

Chris.
 
Found it:

I ran into the same problem. I 'fixed' it by removing one of the if statements in /etc/httpd/conf/httpd.conf
Look around line 80 for
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
and comment out the <IfDefine> like this:
#<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
#</IfDefine>

Not sure why, but for whatever reason the HAVE_PHP4 varialbe wasnt being passed to apache anymore. This stopped it from preloading modules/libphp4.so which caused mod_php4.c to not be found. I think...
 
Re: Found it:

donavan said:
I ran into the same problem. I 'fixed' it by removing one of the if statements in /etc/httpd/conf/httpd.conf
Look around line 80 for

and comment out the <IfDefine> like this:


Not sure why, but for whatever reason the HAVE_PHP4 varialbe wasnt being passed to apache anymore. This stopped it from preloading modules/libphp4.so which caused mod_php4.c to not be found. I think...

Thanks Donovan, it helps me out the... Also here, I have no idea what makes this happent.
 
I think

The problem seems to be with the /usr/local/etc/rc.d/httpd startup/shutdown script which I think is called by DirectAdmin to control Apache.
The function moduleargs() is supposed to parse what modules are compiled/available for apache to use. It then takes the list of modules and fromats them as a -HAVE_<mod> argument.
When the start() function is called it uses the moduleargs() function when calling /usr/sbin/httpd to startup.

The correct way would be to see whats breaking moduleargs() but Im lazy and the dirty hack seems to work fine.
 
Re: I think

donavan said:
The problem seems to be with the /usr/local/etc/rc.d/httpd startup/shutdown script which I think is called by DirectAdmin to control Apache.
The function moduleargs() is supposed to parse what modules are compiled/available for apache to use. It then takes the list of modules and fromats them as a -HAVE_<mod> argument.
When the start() function is called it uses the moduleargs() function when calling /usr/sbin/httpd to startup.

The correct way would be to see whats breaking moduleargs() but Im lazy and the dirty hack seems to work fine.

I report the problem and the solution to John with a link to your message. Thanks again.
 
Back
Top