Jump to content

Archived

This topic is now archived and is closed to further replies.

9AF

Apache Installation on Linux: No Add Modules

Recommended Posts

I have installed apache 2.0.47 about three times on Linux Mandrake 9.1 The installation is ok, but every time I access the httpd.conf file there are no AddModules listed as well as there being no mention of ClearModuleList. I have followed the install instructions from php.net, see PHP and Apache 2 on Linux at http://www.php.net/manual/en/install.apache2.php, and yet they never appear.

 

I am unable to compile any php code without AddModule mod_php4.c which I cant seem to add successfully.

 

Does anybody have suggestions?

 

Much obliged

 

RB[/b]

Share this post


Link to post
Share on other sites

Here\'s all I need in httpd.conf --- is yours similar?

 

#grep php /usr/local/etc/apache/httpd.conf

LoadModule php4_module        libexec/apache/libphp4.so

AddModule mod_php4.c

   <IfModule mod_php3.c>

       <IfModule mod_php4.c>

           DirectoryIndex index.php index.php3 index.html

       <IfModule !mod_php4.c>

           DirectoryIndex index.php3 index.html

   <IfModule !mod_php3.c>

       <IfModule mod_php4.c>

           DirectoryIndex index.php index.html

       <IfModule !mod_php4.c>

   <IfModule mod_php3.c>

       AddType application/x-httpd-php3 .php3

       AddType application/x-httpd-php3-source .php3s

   <IfModule mod_php4.c>

       AddType application/x-httpd-php .php .html .php3

       AddType application/x-httpd-php-source .phps

Share this post


Link to post
Share on other sites

I\'ve managed to resolve the problem, I think. libphp4.so was not installed in the modules directory. I made a copy from the php source distro and put it into the modules folder.

 

I added the line LoadModule php4_module modules/libphp4.so, and it started to work. Though I am somewhat confused as I thought AddModule\'s are supposed to be core components of Apache Server. Does libphp4.so replace the need for AddModules?

 

Thanks for your response LAMP. I am definitely going to try replicate your httpd.conf structure to see what happens.

 

RB

Share this post


Link to post
Share on other sites

Glad to hear it\'s working.

 

In Apache 1.3.x, at least (have no experience with 2.x) you must both \"Load\" and \"Add\" your modules, as your experience has shown.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.