PHP FPM returns HTTP 500 for all PHP errors PHP FPM returns HTTP 500 for all PHP errors php php

PHP FPM returns HTTP 500 for all PHP errors


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

 display_errors = Off

then make it on


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.


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.