php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15773 LoadModule directive incorrectly added to httpd.conf when mod_ssl is used
Submitted: 2002-02-28 02:00 UTC Modified: 2002-04-22 23:36 UTC
From: dswhite42 at yahoo dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.1.1 OS: SunOS 5.8
Private report: No CVE-ID: None
 [2002-02-28 02:00 UTC] dswhite42 at yahoo dot com
(This actually applies to PHP 4.1.2, but the pulldown box on the bug reporting page hasn't been updated to reflect that yet).

When Apache (1.3.23) is compiled with mod_ssl (2.8.7) as a DSO module, mod_ssl automatically adds this to httpd.conf:
...
<IfDefine SSL>
LoadModule ssl_module         libexec/libssl.so
</IfDefine>

Later, when building a DSO version of PHP (4.1.2), using the --with-apxs option, PHP helpfully tries to add the appropriate LoadModule/AddModule directives to httpd.conf.  However, it appears to guess incorrectly where the LoadModule directive should go, so httpd.conf now contains this:
...
<IfDefine SSL>
LoadModule ssl_module         libexec/libssl.so
LoadModule php4_module        libexec/libphp4.so
</IfDefine>

which will cause PHP not to load (and httpd to not start) unless SSL is also running.

The solution, of course, is for httpd.conf to look like this:
<IfDefine SSL>
LoadModule ssl_module         libexec/libssl.so
</IfDefine>
LoadModule php4_module        libexec/libphp4.so

(actually, as I dig into the PHP code, I'm beginning to wonder if it's an apxs problem rather than a PHP problem.  Still, even if it is, perhaps PHP's installer can work around it?)

Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-28 02:04 UTC] rasmus@php.net
Yes, this httpd.conf file mangling is done by apxs which is outside the domain of PHP.  I suppose we could try to work around it somehow, but it would be rather non-trivial.  The most we might be able to do is detect the situation and tell apxs not to try to mangle the httpd.conf file.
 [2002-02-28 13:31 UTC] dswhite42 at yahoo dot com
It appears this issue was reported to the Apache group almost exactly a year ago (3/2/2001 - http://bugs.apache.org/index.cgi/full/7340), which may not bode well for seeing it fixed in Apache anytime soon.  If nothing else, perhaps PHP could warn users to manually validate their new httpd.conf once they've finished compiling/building PHP with --with-apxs .
 [2002-04-22 23:36 UTC] sniper@php.net
This really isn't PHP problem. And there already are
installation instructions in the INSTALL file which 
everybody _should_ read.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 14:01:30 2024 UTC