[PHP] PHP Error logging

2011-01-17 Thread Jimmy Stewpot
Hello,

I currently have a strange issue where we are seeing 'random errors' being 
displayed to end users. What I find most interesting is that in the php.ini 
file we have the following error settings.

error_reporting  =  E_ALL  ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
track_errors = Off

I thought that if we had dislay_errors = Off then end users should never see 
errors displayed on the web page. However at apparently random times we do 
still see errors being reported, its not consistent at all. To give a better 
idea of the problem we have 8 web servers, they all run an identical copy of 
the site which is stored on a common netapp nfs filer. At apparently random 
times we see that 1 out of 8 servers will reported strange errors like 'use of 
undefined constant' or 'Undefined variable'. What's most strange about these 
errors is that if the code was faulty wouldn't we expect to see the errors on 
all web servers? and secondly wouldn't we expect to see the errors constantly 
rather than at apparently random intervals?

The php.ini files have a modify time of mid 2010 and yet this problem has only 
started in the last few weeks. Has anyone else experienced similar problems in 
the past and if so what was the root cause? 

Regards,

Jimmy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Apache and PHP segfaults on Redhat EL5

2011-01-06 Thread Jimmy Stewpot
Hello,

I have been working over the last few months to try and get to the bottom of 
why our apache processes are regularly being killed with a Sig 11 (Segmentation 
Fault). Here are the messages in the kern.log

httpd[22309]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21819]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[19168]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21597]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[22871]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[22090]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21970]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[22315]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21808]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21801]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[20469]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[23509]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21967]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21814]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[24017]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[21605]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[24329]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[23573]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[24328]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[22301]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[24636]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[25028]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[22869]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6
httpd[25030]: segfault at 7fffd01b4ffc rip 2b1f935c064c rsp 
7fffd01b4f90 error 6


We literally have thousands of those, I have tracked it down as far as being 
caused by mod_php in apache (Redhat 5 update 5). However when I enabled 
coredump's in apache I don't get anything. I can however get a dump if I send a 
manual sig 11 to the process. Which brings me to my questions.

Is there a method or way that I can enable a 'debug' mode in php which would 
help me track down and identify the root cause of these problems?
If anyone has any suggestions on what I can do to try and get further down the 
track to enlightenment I would be really appreciated.

Regards,

Jimmy. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php