News Feed
Sections




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

Brian Moon's Blog:
Monitoring PHP Errors
November 09, 2010 @ 11:09:16

Brian Moon has a new post to his blog that pulls together some of his thoughts on monitoring PHP applications and how to handle the error that might be thrown.

PHP errors are just part of the language. Some internal functions throw warnings or notices and seem unavoidable. A good case is parse_url. The point of parse_url is to take apart a URL and tell me the parts. Until recently, the only way to validate a URL was a regex. You can now use filter_var with the FILTER_VALIDATE_URL filter. But, in the past, I would use parse_url to validate the URL. It worked as the function returns false if the value is not a URL. But, if you give parse_url something that is not a URL, it throws a PHP Warning error message. The result is I would use the evil @ to suppress errors from parse_url. Long story short, you get errors on PHP systems. And you don't need to ignore them.

He talks about the two-step process he's upgraded to to help monitor and handle the errors that pop up - an error handler that logs human-readable and json versions of the errors and something like Circonus to do metric tracking. He also mentions some external services recommended on twitter - HopToad and Loggly.

0 comments voice your opinion now!
monitor error manage aggregate metric log


blog comments powered by Disqus

Similar Posts

Fabien Potencier's Blog: Getting information from SVN with PHP

Hasin Hayder's Blog: Vulnerable bug in CodeIgniter which took us hours to fix our corrupted database

Till Klampaeckel's Blog: Contributing to PEAR: Taking over packages

Web Designer Online: 10 great Alternatives to phpMyAdmin

NETTUTS.com: 404/403 Website Error Pages With PHP Auto-Mailer


Community Events





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


conference language symfony threedevsandamaybe unittest release composer list configure series voicesoftheelephpant interview podcast community version laravel opinion api framework introduction

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