The Burton Tech Journal

Tag: debugging

Enable PHP Error Messages

by on Nov.29, 2008, under PHP

PHP errors should be turned off on a live site, but occassionally it is useful for debugging purposes to display any error messages.  Depending on the type of hosting, you can generally use one of the following methods:

  1. Edit the site’s php.ini file

    error_reporting  =  E_ALL
    display_errors = On

    E_ALL = All errors and warnings, as supported, except of level E_STRICT in PHP < 6.

  2. Alternatively, you can use an .htaccess file

    php_flag display_startup_errors on
    php_flag display_errors on
    php_flag html_errors on

Make sure to turn the “On” values to “Off” once you are done to prevent any visitors from seeing the errors.

Leave a Comment :, , , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...