busboy — 2012-10-19T18:06:20-04:00 — #1
I am trying to track down the reason some of my users are reporting a blank white page while trying to view different links on my website. I recently upgraded to PHP 5.3 and I'm using one php.ini file for all my directories. In my php.ini file I think I have everything turned on correctly. But when I goto a page I know has a parse error, even though I see the error on the screen, it is not logging it in the error_log file on the root of my server. Can someone help me understand why?
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
log_errors = On
; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors = 1024
; Log errors to specified file. PHP's default behavior is to leave this value
error_log = error_log
; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog
spacephoenix — 2012-10-20T01:57:31-04:00 — #2
cups — 2012-10-20T06:57:50-04:00 — #3
The directive regarding the location of the log file for a domain can also be set inside the httpd.conf file (using Apache anyway) which will overrule your php.ini file setting AFAICT.
kduv — 2012-10-20T19:30:37-04:00 — #4
Meh, just set your log file to /dev/null. It will make things interesting.*
*That was a joke ... please do not do that
john_betong — 2012-10-20T21:10:45-04:00 — #5
Just tested this script to ensure my error_log was reporting correctly:
# set error_log and toggle settings
# show previous errors in log_file
$error_log = ini_get('error_log');
echo '<h1>' .$error_log .'</h1>';
# force error and stop execution
require 'this-is-a-test-to-see-if-the-errors-are-being-logged.php' .time();
echo 'This line should never ever be displayed';