NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can I set the response code if a PHP Fatal error occurs?

lorband at optonline.net lorband at optonline.net
Tue Feb 17 10:05:51 EST 2009


 I am using AJAX to submit a PHP request. If a PHP Fatal error occurs when running the php program, the http response code is 200 and it appears the program ran successfully. Is there a way for php to return a 500 http response code when a fatal error occurs so myjava_script that is processing the response can alert the user that an error has occurred? Try/catch won't capture fatal errors for me to set the header. 
Thank you,
Lori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090217/bb2658a7/attachment.html>


More information about the talk mailing list