News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Jonnay's Blog:
An issue with PHP's error handling
January 19, 2006 @ 07:35:42

On Jonnay's blog today (at jonnay.net), there's this new post talking about an issue with the way PHP handles certain errors.

With all my REST and AJAX explorations, I have run into what I consider to be a fundamental issue in PHP's error handling: when the parser or interpreter runs into an error it will always return HTTP status code 200.

Semantically this is wrong. Here is the way it should be, at least in my eyes:

If PHP runs into a non-recoverable error (E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR and E_COMPILE_WARNING; i.e. where the error cannot be trapped by set_error_handler()), it should spit out a HTTP status code of 500 (Internal Server Error), and depending on the setting of the ini directive display_errors display the error text, or conversely the standard Internal Server Error page.

He meditation (a set of classes that aid in REST APIs).

0 comments voice your opinion now!
php issue with error handling return HTTP code 200 php issue with error handling return HTTP code 200



Similar Posts

Christian Stocker\'s Blog: PHP 5, OS X, fink and iconv

4Null4.de: Four new vulnerabilities in PHP found

PHP Security Blog: A Trio of Javascript Issues

Acunetix.com: Web Site Security Center

Sonspring.com: Time Sensitive CSS


Community Events









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


framework example package PHP5 release developer book releases security job code conference application cakephp mysql database ajax PEAR zendframework zend

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