How do I enable error reporting in a PHP script?

There are two ways to enable error reporting in your PHP scripts:

  1. Add the following function in the script:
  2. Add the following option in your website’s php.ini file:
    error_reporting = E_ALL

Both options will enable reporting for all PHP kinds of errors. More information on error reporting and its various options can be found in the official PHP documentation.

At Eltris PHP error reporting is enabled by default for all hosting accounts.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.