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.

link|improve this question
It's possible to use error_reporting() to change the error reporting level during run-time. But how do you know this is caused by a PHP error? And this is an unlikely scenario, but the script could be using the error suppression operator @ and just terminating the script with die before any output is printed. – Lèse majesté Jun 21 '10 at 6:44
feedback

1 Answer

It seems like the display_errors or error_reporting were overridden by something else.

It happened to me by an application that changes the error_reporting later in the bootstrap which I didn't see.

A good practice is to search for error_reporting within the application and see it is modified somewhere.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.