>I also believe that header("HTTP/1.1 500 ...") will do the >trick, and there is also the revamped Apache hooks stuff that >is being worked on that should give even more control to >developers who choose to use it.
For some reason here, everyone is forgetting that PHP isn't running just on apache web servers. I don't agree with the idea of relying on the potential of apache_hooks, when they are still experimental and furthermore of course Apache-specific. I think everyone is in agreement here that better ways to deal with "fatal" errors is desirable, and we seem to be aruging about implementation. Although I do like the idea of having a 500 error, I don't believe it provides enough flexablity to the developer when dealing with the error (since there is no way to determine the nature of the error). With that in mind, here's what I propose: 1) two new configuration directives. The first error_handler which supports the following forms: internal (default) -- the standard method of handling errors url Upon an error, re-direct the browser to a new URL and pass a GET query containing the error info server create a 500 error The second directive error_handler_url should specify the URL to pass to if 'url' for error_handler is specififed 2) If the URL option is used, all of the standard error parameters are passed via GET parameters I believe this way provides the most flexablity to deal with any error PHP is going to throw at a user without breaking old code. Please RFC of course :) John >-----Original Message----- >From: Chris Shiflett [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, November 20, 2002 6:31 PM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: [PHP-DEV] error handling > > >--- John Coggeshall <[EMAIL PROTECTED]> wrote: >> See, the problem that I'm seeing here is that I don't believe PHP is >> reponsible for setting the error code returned by PHP.. For >instance, >> a 404 error isn't handle by PHP at all. Likewise, I don't think PHP >> can say "turn this into a 500 error" to Apache. > > >Chris > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php