I wrote a test script. If I have the following:
echo “aaa”;
echo $undefined_var;
echo “bbb”;
Then the script silently dies without errors. The php.ini file has “error_reporting = E_ALL” and “display_errors = On”. Any ideas?
I wrote a test script. If I have the following:
echo “aaa”;
echo $undefined_var;
echo “bbb”;
Then the script silently dies without errors. The php.ini file has “error_reporting = E_ALL” and “display_errors = On”. Any ideas?
I figured it out. An earlier ‘require’ statement had declared an error handler which was swallowing the errors.
If on the off-chance it ever happens again then try this:
echo '<br /> error_reporting() == ' .error_reporting();
echo '<br /> error_reporting() == ' .error_reporting(-1);
echo '<br /> ini_get( "display_errors") == ' . ini_get( "display_errors") ;
ini_set('error_log', getcwd().'/here-is-my-new-error_log.php');
die;
Ok, thanks, it might be useful to set the error log file which is something I had not considered.