I am using Nginx + php7.0-fpm. Some of my errors (500 code) go into the status code header. In the browser console I see, for example, such a message:
POST https://example.com 500 (DateTime::__construct(): Failed to parse time string (2017-04-09 :) at position 11 (:): Unexpected character)
I tried disabling error reporting, display_errors = off
does not work as well – errors go to the header, and they are never logged. The nginx error log is clear. But not all errors are risen like that – most of them are handled correctly. I have the fastcgi_intercept_errors
directive enabled in the nginx.conf
.
When I switch back to php5, I do not see such behaviour. The problem is only when I use php7.0. Can't figure out how to make errors go into the log instead of the browser console.