How to display PHP errors in code output?
ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);
Inside your php.ini, set the display_errors
to On
:
display_errors = On
Then restart your web server.
Try -1
. From the documentation, "Passing in the value -1 will show every possible error, even when new levels and constants are added in future PHP versions."
// Report all PHP errors
error_reporting(-1);
If that doesn't work, try to do an ini_set
:
// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);