This isn't as easy as it sounds to be.
I'd like to have error reporting temporarily report to the screen.
I have a server, typical LAMP server, that doesn't have PHP errors turned on. Instead it logs them to the error_log for the site, not the server, the site.
So in my PHP.INI, I have:
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
log_errors = On
If there is an error, I get a blank screen then I have to A) visually recheck my code, or B) check the logs
I would like to get screen reporting on the errors.
None of these work in the PHP script.
ini_set('error_reporting',E_ALL);
ini_set('display_errors','On');
error_reporting(1);
Only if I change
display_errors = Off
to
display_errors = On
then
apachectl -k restart
do I get error reporting on the screen which I really don't want as it could expose the rest of the sites on the server.
Then when I'm finished, I turn off error reporting.
Is there a way to temporarily do this?
My guess is that there is a hidden conf file that I can't find that is preventing this.
I'd like to have error reporting temporarily report to the screen.
I have a server, typical LAMP server, that doesn't have PHP errors turned on. Instead it logs them to the error_log for the site, not the server, the site.
So in my PHP.INI, I have:
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
log_errors = On
If there is an error, I get a blank screen then I have to A) visually recheck my code, or B) check the logs
I would like to get screen reporting on the errors.
None of these work in the PHP script.
ini_set('error_reporting',E_ALL);
ini_set('display_errors','On');
error_reporting(1);
Only if I change
display_errors = Off
to
display_errors = On
then
apachectl -k restart
do I get error reporting on the screen which I really don't want as it could expose the rest of the sites on the server.
Then when I'm finished, I turn off error reporting.
Is there a way to temporarily do this?
My guess is that there is a hidden conf file that I can't find that is preventing this.