Output PHP errors on your pages

To output any PHP errors you might have, simply add the following at the top of your PHP file

<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);

// any other code that you might think contains errors
?>

Or add the following to your php.ini file:

display_errors = on

This should display the errors. Make sure to restart your webserver; if you have Apache, use:

apachectl -k graceful

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

Leave a Reply

Your e-mail address will not be published. Required fields are marked *