We have disabled error displaying in the php.ini file on our web servers. This means that no errors will be displayed when a faulty PHP script is run.
However, you may show the PHP errors by directory. To do this, you simply need to place an .htaccess file inside the directory with your PHP pages. To enable errors being displayed to the browser, add an .htaccess file containing the information below:
php_flag display_errors on
php_value error_reporting 7
The number after 'error_reporting' represents the error reporting integer. This parameter is an integer representing a bit field. The value of the error reporting level you want can be calculated as follows:
Error Reporting Level |
bit value |
normal errors |
bit value 1 |
normal warnings |
bit value 2 |
parser errors |
bit value 4 |
non-critical style-related warnings |
bit value 8 |
The default value for this directive is 7 (normal errors, normal warnings and parser errors are shown).