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?

Was it helpful?

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top