Display errors is usually always turned off in the php.ini or your Apache config file to stop the wrong people seeing details of your server if something goes wrong.

When debugging code I always add the following three lines to the top of the script I am looking at:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

That prints out all the errors I need.

Leave a Reply

Your email address will not be published. Required fields are marked *