0
votes

Very occasionally I get a mystifying white-screen-of-death PHP error - nothing is displayed or logged, even with the following settings:

ini_set("error_reporting",E_ALL);
ini_set("display_errors",true);
ini_set("log_errors",true);
ini_set("display_startup_errors",true);
ini_set("html_errors",false);
ini_set("error_log","/var/log/php_error_log");

I read somewhere that output buffering or memory limit errors can result in no error output, but previously (for example) I have found a WSOD simply caused by __autoload() looking for a missing class file.

Has anyone found a way to get these errors visible? I hate commenting out blocks of code.

Thanks

1
Do not add settings specifically to your application unless there application dependant, you shuld modify the php.ini file and restart your web server, as a lot of the time it does not override the ini.RobertPitt

1 Answers

3
votes

I had a similar problem recently and it turned out that the software package I was using was overriding the logging settings so that I was never seeing the logs in certain situations. Because your putting the settings in the ini file, i'm guessing your using php.ini, there is a lot of opportunity that something closer to where the code is run is changing the settings.

My advice would be to put error_reporting(E_ALL | E_STRICT); in the file that is causing the problem and see if that improves things.