ID: 24597
User updated by: jordan at tumyeto dot net
Reported By: jordan at tumyeto dot net
Status: Bogus
Bug Type: Apache related
Operating System: RedHat 2.4.7-10smp
PHP Version: 4.3.2
New Comment:
More detail:
php_errors.log gets created in the home user's public_html directory.
/home/username/public_html/php_errors.log
If the Apache user is not given write access to
/home/username/public_html then this crash happens. as soon as i do
chmod a+w /home/username/public_html, the problem goes away. Are you
sure you've followed all of these requirments, and you still can't
reproduce it?
Previous Comments:
[2003-07-13 22:22:56] [EMAIL PROTECTED]
I still can't reproduce this. (using latest stable CVS)
[2003-07-10 21:39:05] jordan at tumyeto dot net
Try these php.ini settings:
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 0
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = On
error_log = php_errors.log
I get the errors with these settings. Setting log_errors and
track_errors to OFF makes the problem go away.
[2003-07-10 19:58:32] [EMAIL PROTECTED]
I can't reproduce this.
[2003-07-10 18:14:41] jordan at tumyeto dot net
Description:
Summary: If the directory containing error_log is not writeable, Apache
gets stuck taking 100% CPU.
Detail:
I recently set log_errors = On in php.ini, and began receiving a TON of
[notice] child pid 15591 exit signal Segmentation fault (11) in my
Apache error_log. In addition, a ton of Allowed memory size of
8388608 bytes exhausted (tried to allocate 2 bytes) began showing up
as well. Even worse, Apache child threads would shoot up to 100% CPU
and over time 5-6 threads would all be fighting for that 100%, causing
page serve problems.
I come to find out that the directoy that error_log was set to go to
was not writeable by the webserver user. As soon as I make the
directory writeable (or turn off log_errors), all problems go away and
the server returns to normal operations.
'./configure' '--prefix=/usr/local'
'--with-apache=/usr/local/Apachetoolbox-1.5.66/apache_1.3.27'
'--enable-exif' '--enable-track-vars' '--with-calendar=shared'
'--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx'
'--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit'
'--with-gd=/usr/local' '--with-zlib' '--enable-gd-native-tt'
'--with-t1lib=/usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/usr/local'
'--with-imap=/usr/sbin' '--with-openssl=/usr' '--with-gd'
'--with-zlib-dir=/usr' '--with-png-dir=/usr' '--with-jpeg-dir=/usr'
'--with-mysql' '--with-ldap' '--with-kerberos=/usr/kerberos'
Reproduce code:
---
1) Enable log_errors in php.ini
2) Set error_log to a directory not writeable by the webuser.
3) Create some php errors that you would expect to be logged into
error_log.
4) Send a lot of traffic to the server, watch your Apache's error_log
and watch Apache threads shoot up to 100% CPU.
Expected result:
If error_log cannot be written, abort instead of taking down Apache.
Actual result:
--
[notice] child pid 15591 exit signal Segmentation fault (11)
Allowed memory size of 8388608 bytes exhausted (tried to allocate 2
bytes)
--
Edit this bug report at http://bugs.php.net/?id=24597edit=1