Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909 - Apache PHP problems
Summary: Apache PHP problems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Bruce A. Locke (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-01 12:09 UTC by Daryl Stimm
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daryl Stimm 2002-03-01 12:09:39 UTC
I installed apache by doing these commands:
emerge net-www/apache dev-lang/php

rc-update add httpd default

and Added this to /etc/rc.conf
#Apache options
HTTPD_OPTS="-D SSL -D PHP4"
when I try to start the server it says this in my error log:

[Fri Mar  1 12:19:42 2002] [notice] SIGHUP received.  Attempting to restart
[Fri Mar  1 12:19:42 2002] [error] Cannot remove module mod_php4.c: not found in
module list
[Fri Mar  1 12:19:44 2002] [notice] Apache/1.3.23 (Unix) configured -- resuming
normal operations
[Fri Mar  1 12:19:44 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Mar  1 12:20:13 2002] [error] [client 66.140.25.157] File does not exist:
/usr/local/httpd/htdocs//
[Fri Mar  1 12:24:13 2002] [notice] caught SIGTERM, shutting down
[Fri Mar  1 12:24:13 2002] [error] Cannot remove module mod_php4.c: not found in
module list
[Fri Mar  1 12:27:32 2002] [notice] Apache/1.3.23 (Unix) configured -- resuming
normal operations
[Fri Mar  1 12:27:32 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Mar  1 12:27:40 2002] [notice] caught SIGTERM, shutting down
Comment 1 Grant Goodyear (RETIRED) gentoo-dev 2002-03-01 12:31:23 UTC
Although httpd fails to start w/ php-4.1.2, it works fine when downgraded to
php-4.1.1-r5.
Comment 2 Bruce A. Locke (RETIRED) gentoo-dev 2002-03-01 17:02:43 UTC
Quick fix is to remove HTTPD_OPTS from rc.conf.  My rc.conf didn't have that and
php was loaded fine for me.  I'll have to muck around in what the php package is
adding to the apache configs to see what broke (btw where is HTTPD_OPTS documented?)
  
Comment 3 Bruce A. Locke (RETIRED) gentoo-dev 2002-03-02 12:30:16 UTC
My problem was caused by a lack of IfDefine's for php (which HTTPD_OPTS contains
defines for) in my httpd.conf.  I'd imagine your problem is caused by having
multiple LoadModule, etc in your httpd.conf

The php ebuild's current pkg_config() doesn't insert IfDefines and the sed's
failed for me on a default apache httpd.conf.

Until I (or someone else) gets around to fixing pkg_config you'll need to enable
php in your httpd.conf the old fashion way (see pkg_config in the php ebuild for
the lines to add)

I'll try to work on it but I'm not a php user so....
Comment 4 Bruce A. Locke (RETIRED) gentoo-dev 2002-03-07 02:33:24 UTC
I modified pkg_config to add the appropriate IfDefines to your httpd.conf if
they are not already there (make sure to remove any LoadModule lines for libphp).

The better solution is to use /usr/portage/net-www/apache/files/httpd.conf and
edit it for your needs as it has all the IfDefs in it already.

I believe my modifications to pkg_config and the httpd.conf file will be
shortlived as woodchip is working on an apache overhaul.

Please reopen the bug if it turns out not to be a http.conf problem for you.