error in php not logging or displaying

Posted by Grant M on Server Fault See other posts from Server Fault or by Grant M
Published on 2010-06-21T06:37:19Z Indexed on 2011/11/20 1:55 UTC
Read the original article Hit count: 646

Filed under:
|
|

I can not get any errors to display on screen on write to a log file. When check phpinfo() print out I have same value of master a local for

display_errors On 
display_startup_errors On
error_log /var/log/php.log
error_reporting E_ALL & ~E_NOTICE
log_errors On
log_errors_max_len

ls -l /var/log/php.log is -rw-rw-rw- 1 root root 0 Jun 21 07:47 /var/log/php.log for /var and /varlog drwxrwxrwx 23 root root 4096 Jun 2 11:13 var

when there is an error in the code the page the browsers shows nothing and browser says there is no source for the page. Any suggestions of where else to look or change to errors to appear somewhere (anywhere would be good)

edit: my error script is now

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
echo "print from error.php 2 ";
error                        
//print from erroerror to cuase logging to happen.
?>

this will print on display and to log

Notice: Use of undefined constant error - assumed 'error' in /var/www/piku_dev2/error.php on line 7

but if I put garbage like #@$%$ on the error line I get nor error messages anywhere.

Edit2: The problem turned out to in the httpd.conf file. I don't know what it was yet as it was fixed y someone else.

© Server Fault or respective owner

Related posts about php

Related posts about log-files