PHP FPM returns HTTP 500 for all PHP errors

Also I met the problem, and I set display_errors = Off in php.ini but it not works. Then I found the php[display_errors]=off in php-fpm.conf, and it will override the value of php.ini and it works.


To post a more complete answer, I had used a production version of php.ini which has display_errors = Off. Instead of turning it on globally, what I do now is, for files which I need error reporting on, I use ini_set('display_errors', 'On'); at the beginning of the file.


Display errors will only affect the fact that the errors are printed to output or not.

If you have log errors turned on, the errors will still be missing from log unless display is off, which isn't the expected behavior.

The expected behavior is if log is on, errors are found there. If display is on, errors are found on screen/output. If both are on erros are found on both.

Current versions have a bug that forfeits that.


Try to find the following line in your php.ini:

 display_errors = Off

then make it on