Better error reporting for PHP, and prettier too! Fork of original PHP-Error by Joseph Lenton better suited for production environments.
This is a fork of original PHP-Error by Joseph Lenton better suited for production environments.
It gives you the power of catching crtical and trivial errors in a coherent way. You can log every error in your app, and show your users a meaningfull error page. At the same time, you can configure the server to show you, the developer, full stack trace and all other PHP-Error goodness.
The fork was done before Joseph added ACE remote file editing, and it will be kept this way.
PHP errors are not good enough for development, it's as simple as that. This aims to solve this.
When an error strikes, the page is replaced with a full stack trace, syntax highlighting, and all displayed to be readable.
If the server errors during an ajax request, then the request is paused, and the error is displayed in the browser. You can then click to automatically retry the last request.
Check out the project homepage for a live demo.
- trivial to use, it's just one file
- errors displayed in the browser for normal and ajaxy requests
- ajax requests are paused, allowing you to automatically re-run them
- makes errors as strict as possible (encourages code quality, and tends to improve performance)
- code snippets across the whole stack trace
- provides more information (such as full function signatures)
- fixes some error messages which are just plain wrong
- syntax highlighting
- looks pretty!
- Download, it's just one file.
- Place it in your project.
- import php_error.php
- call \php_error\reportErrors()
<?php require( 'php_error.php' ); \php_error\reportErrors(); ?>
This is intended for development only. It shows more about your site, gives you more info, and makes trivial errors fatal. All of that is awesome if you want to debug quicker, and force high quality standards.
On a production server, that sucks, and is potentially unsafe.
In case you forget, you can disable this in production using the 'php_error.force_disabled' php.ini option (see below).
- manually turn it on and off
- run specific sections without error reporting
- ignore files allowing you to avoid highlighting code in your stack trace
- application files; these are prioritized when an error strikes!