Last Updated: February 25, 2016
·
1.264K
· terales

Specific error reporting for the virtual host

If you need to change error handling level for development purposes and don't want to modify source code or global web-server configuration you can modify error reporting parameters for single virtual host:

<VirtualHost *:80>
    ...
    <IfModule mod_php5.c>
        php_admin_flag display_errors on
        php_admin_value error_reporting **INTEGER**
    </IfModule>
    ...
</VirtualHost>

We can obtain desired INTEGER with one line of code (for example):

echo E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED;

Predefined error handling constants: http://php.net/manual/en/errorfunc.constants.php