PHP when display_errors is set to 0 500 in AJAX response

I have a wired problem. When I set display_errors to 0 on a production environment, then an AJAX request to some PHP script returns a 500 Apache server error and nothing works. When I set it to 1, then the answer is 200 and everything will be fine.

The question is what is the relationship between display_errors and the server error number. I don't understand and php.com doesn't explain it at all.

Also, I have set error_log, but no erros logged to either display_errors or 1 or 0. Has anyone had this problem before?

+2


a source to share


1 answer


The question is what is the relationship between display_errors and the server error number. I don't understand and php.com doesn't explain it at all.

display_errors

- PHP internal method that is used with errors coming from PHP. Server errors come from Apache and are not directly related to PHP * ( list of HTTP status codes )



* - although PHP can send HTTP status codes

+1


a source







All Articles