I’ve built an error handler for my PHP app to gracefully and intelligently display errors based on the current user rights, which worked great when I was just using straight up Apache (httpd)…. which is to say the following isn’t anything to do with the standard stuff like
display_errors = On or setting the error level to
When I moved to PHP-FPM, I’m now getting
503 Server Unavailable when there’s a coding error, and in the logs
Failed to read FastCGI header, with Apache’s generic error screen, rather than my handler.
My errors are still logged properly in the DB the way I expect them to from the handler, but I’m no longer getting pretty feedback and have to look at the DB every time I need to dubug something, it’s a PITA.
I haven’t been able to find an answer relating to this because most people want to hide their errors, not display them the way I do, so there’s too much static. I KNOW the error is in my PHP code when this comes up, this is not my issue, I just want the output to be displayed rather than a generic 503 error message.
If I add a handler to the
errordocument 503 /error.php
error.php page shows, but I want the direct output from the handler, not a redirect. If there was for instance a DB error and it couldn’t write the error to my log table, then I need to see the output immediately with all the trace info available.
I’m assuming this is a missing / misconfigured conf setting in
httpd.conf, so if anyone can help shed light, I’d appreciate it!