Question

I recently upgraded to PHP 5.3.22 and now I'm getting WSODs whenever there are errors in my php code. I know I have display_errors disabled in php.ini, so I tried adding the following code to the top of my scripts to temporarily enable displaying errors on the screen for debugging.

error_reporting(E_ALL);
ini_set('display_errors', '1');

The above works if I have an undefined function but if I miss a semi-colon at the end of a line, it still displays a WSOD.

How can I get all errors to display on screen when I'm developing the scripts?

Était-ce utile?

La solution

Enabling error reporting at run time like that fails to show fatals. You can enable it in your php.ini or add this to your htaccess to override it:

php_value display_errors 1

Autres conseils

As the file cannot be parsed, setting the error level and display_errors inside the file is having no effect.

Set it in your php.ini

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top