Skip to content
Advertisement

Tag: error-code

Apache/PHP returns HTTP Status Code 200 on error pages

I’m running PHP 5.4 on CentOS 7 and when there is a php file that throws an error (either an exception, or a syntax error) it returns an HTTP 200 status code instead of 500. How can I get it to return a 500 server error when PHP encounters an error? I’ve tried looking at other Stackoverflow posts, and they

Advertisement