News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso's Blog:
Display errors on screen even with display errors = off with PHP
October 11, 2011 @ 11:03:07

Gonzalo Ayuso has posted a handy tip to his blog today about showing errors even with "display_errors" being off in your application (could be helpful in debugging those difficult problems).

Shared hosting are cheap, but normally they don't allow us the use some kind of features. For example we cannot see the error log. That's a problem when we need to see what happens within our application. Normally I work with my own servers, and I have got full access to error logs. But if we cannot see the error log and the server is configured with display errors = off in php.ini (typical configuration in shared hosting), we have a problem.

His solution involves an "error sniffer" script that captures the issues in a script and echoes them out at the end. In his ErrorSniffer he sets up a custom error, exception and shutdown handler to grab the problems and capture them for later use - including echoing them out to the user if desired.

0 comments voice your opinion now!
error errorsniffer shutdown exception handler github:https://github.com/gonzalo123/ErrorSniffer


blog comments powered by Disqus

Similar Posts

DevShed: Building an Error Logger with the Chain of Responsibility Pattern in PHP 5

FinalConcept.com.au: Symfony: Unbound sfForm: Unexpected extra form field named

Quinton Parker's Blog: session-clustering with memcache

Nikita Popov's Blog: htmlspecialchars() improvements in PHP 5.4

NETTUTS.com: Are You Making These 10 PHP Mistakes?


Community Events





Don't see your event here?
Let us know!


install series language podcast refactor unittest wordpress developer threedevsandamaybe release introduction list community interview api opinion testing code laravel framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework