View previous topic :: View next topic |
Author |
Message |
Xtraneous n00b
Joined: 13 Oct 2003 Posts: 8
|
Posted: Mon Oct 13, 2003 2:34 pm Post subject: Apache2 problems when mod_php is loaded |
|
|
Hi, I am having a very annoying problem trying to get mod_php working on my gentoo system.
When I start apache using the following /etc/conf.d/apache2 file, apache2 loads, and you get the default page.
Code: |
# Config file for /etc/init.d/apache2
# An example from /etc/apache2/conf/modules.d/40_mod_ssl.conf:
#
# <IfDefine SSL>
# <IfModule !mod_ssl.c>
# LoadModule ssl_module extramodules/mod_ssl.so
# </IfModule>
# </IfDefine>
#
# This means that the mod_ssl.so DSO module is only loaded
# into the server when you pass "-D SSL" at startup. To
# enable WebDAV, add "-D DAV -D DAV_FS". If you installed
# mod_php then add "-D PHP4". For more options, please
# read the files in the /etc/apache2/conf/modules.d directory.
#APACHE2_OPTS="-D PHP4"
|
Yet, when I load apache2 with the last line uncommented, I am unable to connect. Apache2 seems to start OK, but it will not serve any pages. It isnt a browser problem; I port-scanned the server (there is no firewall between the port-scanner and the apache2 system,) and port 80 was in the "closed" state. What is the problem? What should I do to fix it?
Thanks in advance,
Xtraneous |
|
Back to top |
|
|
BenjyD_UK n00b
Joined: 03 Sep 2003 Posts: 44
|
Posted: Mon Oct 13, 2003 5:39 pm Post subject: USE flags? |
|
|
Did you have apache2 defined in your use flags when you emerged mod_php? I don't think it puts its configuration files in the right place otherwise.
A more specific error message would help us debug the problem - what output do you get in /var/log/syslog when you try to start apache2? |
|
Back to top |
|
|
Camoes Tux's lil' helper
Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Mon Oct 13, 2003 6:05 pm Post subject: |
|
|
i think the problem is more the mod_php module. Recent ebuilds caused some problems.
try to restart apache2 in the console with Code: | /etc/init.d/apache2 reload |
if it is complaining about a missing libmysqlclient.so.10 my guess was right and you have to do a
which is provided by gentoolkit _________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
|
Xtraneous n00b
Joined: 13 Oct 2003 Posts: 8
|
Posted: Mon Oct 13, 2003 8:25 pm Post subject: |
|
|
Camoes wrote: | i think the problem is more the mod_php module. Recent ebuilds caused some problems.
try to restart apache2 in the console with Code: | /etc/init.d/apache2 reload |
if it is complaining about a missing libmysqlclient.so.10 my guess was right and you have to do a
which is provided by gentoolkit |
/etc/init.d/apache2 reload provided some *interesting* results.
Code: |
* Gracefully restarting apache2...
* Could not get dependency info for "apache2"!
* Please run:
* # /sbin/depscan.sh
* to fix this.
* Could not get dependency info for "apache2"!
* Please run:
* # /sbin/depscan.sh
* to fix this.
* Starting apache2...
|
I did the /sbin/depscan.sh and the same error occured. I am currently emerging the gentoolkit. Thanks for your help,
X |
|
Back to top |
|
|
Xtraneous n00b
Joined: 13 Oct 2003 Posts: 8
|
Posted: Mon Oct 13, 2003 9:19 pm Post subject: |
|
|
Gah, neither of those made any difference whatsoever.
Linux is currently making me want to "rm -rf *" it. |
|
Back to top |
|
|
Xtraneous n00b
Joined: 13 Oct 2003 Posts: 8
|
Posted: Mon Oct 13, 2003 9:23 pm Post subject: |
|
|
Gah! I just rebooted, and guess what?
PHP works!
I need one of those signs that has a bull's-eye, and says, "To relieve stress, bang head here!"
--A very-very confused,
Xtraneous |
|
Back to top |
|
|
vedic-Ai n00b
Joined: 15 Aug 2003 Posts: 11
|
Posted: Sat Nov 01, 2003 11:03 am Post subject: This might be a real problem |
|
|
I'm experiencing the exact unexplained phenomenon with "apache2 -D PHP4". It "just happens" that sometimes apache2 will not start with mod_php loaded. Usually re-emerging mod_php helps solve the problem, but the same thing starts happening again, even if there are no system updates whatsoever in between.
I checked /var/log/apache2/error_log.
On successful start of apache2 with mod_php it reads: Code: | [Sat Nov 01 11:31:07 2003] [notice] Digest: generating secret for digest authentication ...
[Sat Nov 01 11:31:07 2003] [notice] Digest: done
[Sat Nov 01 11:31:08 2003] [notice] Apache/2.0.47 (Gentoo/Linux) mod_ssl/2.0.47 OpenSSL/0.9.6j DAV/2 configured -- resuming normal operations
| ... but when started unsuccessfully it reads only: Code: | [Sat Nov 01 11:31:53 2003] [notice] Digest: generating secret for digest authentication ...
[Sat Nov 01 11:31:53 2003] [notice] Digest: done
|
The problem can also be indentified by listing apache2 processes.
When apache2 is started successfully, process list looks something like this (note: I run "/etc/init.d/apache2 start", but remove "-D PHP4" option from "/etc/conf.d/apache2"): Code: | root 4675 12.0 0.4 7192 3988 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4677 0.0 0.4 7008 3800 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4678 0.0 0.4 7200 4016 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4679 0.0 0.4 7200 4012 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4680 0.0 0.4 7200 4012 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4681 0.0 0.4 7200 4012 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
apache 4682 0.0 0.4 7200 4012 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS
|
... on unsuccessful start (with "-D PHP4" option present), process list is obviously strange: Code: | apache 4763 0.0 0.9 25784 9012 ? S 11:31 0:00 /usr/sbin/apache2 -k start -D SSL -D DAV -D DAV_FS -D PHP4 |
Running apache2 with "-e debug" option yields an error in mod_ssl regarding shared memory (I did some code grep of apache and php to find this error message and it turned up in "/<httpd>/modules/ssl/ssl_cache_shmcb.c": Code: | ...
[Sat Nov 01 11:42:16 2003] [debug] mod_so.c(290): loaded module ssl_module
[Sat Nov 01 11:42:16 2003] [debug] mod_so.c(290): loaded module dav_module
[Sat Nov 01 11:42:16 2003] [debug] mod_so.c(290): loaded module dav_fs_module
[Sat Nov 01 11:42:16 2003] [debug] mod_so.c(290): loaded module php4_module
[Sat Nov 01 11:42:17 2003] [notice] Digest: generating secret for digest authentication ...
[Sat Nov 01 11:42:17 2003] [notice] Digest: done
[Sat Nov 01 11:42:18 2003] [error] Cannot allocate shared memory: (17)File exists |
It might be, that mod_php is having same kind of trouble (shared memory FileExists-or-something).
Does anyone have any suggestions on how to proceed from here? |
|
Back to top |
|
|
|