An easy to integrate error handler setup, made for PHP applications without one.
It intercepts PHP errors, notices etc. and writes them into the PHP error log.
$ composer require sjoorm/generic-error-handler
// TBD
- determine your include path by
php -i | grep include_path
- place release version in it
- optional: edit
error_log
directive in yourphp.ini
to write into the file instead of web server error log - add the following code to your entry point (e.g. Wordpress
wp-config.php
)
require_once('generic-error-handler/init.php');
Based on Symfony/error-handler and Seldaek/monolog.