Forum Moderators: phranque
[root@server public_html]# 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
Any suggestions of how I can troubleshoot this?
LoadModule php4_module libexec/libphp4.so
If so, then you would want to check the file listed exists. Look for the ServerRoot parameter in the httpd.conf file, it should contain a path. Then append the LoadModule path to that. For instance, /usr/local/apache/libexec/libphp4.so. See if that file exists. If not, verify you have the php installed. It sounds like you did not compile apache from source, but installed a package, so PHP would probably be the same way. How you do this will depend on your flavor of linux.
Hopefully that will get you started.
The AddModule and ClearModuleList directives no longer exist in Apache 2. These directives were used to ensure that modules could be enabled in the correct order. The new Apache 2.0 API allows modules to explicitly specify their ordering, eliminating the need for these directives.
When I do httpd -l I get the following:
Compiled-in modules:
http_core.c
mod_so.c
mod_frontpage.c
suexec: enabled; valid wrapper /usr/sbin/suexec
I'm also having trouble with SSIs, and I read somewhere that mod_includes needs to be running.
I don't have an exactly similar LoadModule, I've got this earlier on:
LoadModule php4_module modules/libphp4.so
When I comment out line #160, I get the following error:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
I'll put it back.
Also, mod_include is a base module which means that it is compiled and loaded into the server by default, and is therefore normally available unless you have taken steps to remove the module from your configuration. Have you read the Apache docs regarding How do I enable SSI (parsed HTML)? [httpd.apache.org]
Statically compiled modules (those listed by 'httpd -l') do not need to be loaded via LoadModule. Your list doesn't show PHP so it lends to reason that you need the LoadModule [httpd.apache.org] directive.