fpm not logging 500 error anywhere

Nor do nginx or php-fpm reports a error 500 output, In fact the 500 response is on the access log and not on the nginx error log. The script is running ok in my dev environment.

nginx version: nginx/1.6.2  
PHP 5.5.19 (fpm-fcgi)

Tried this

catch_workers_output = 1

Restarted everything, still not working

nginx access log shows:

x.x.x.x - - [12/Dec/2014:19:25:08 -0200] "GET /merchant/customer/mobile/data?sEcho=1&iColumns=3&sColumns=%2C%2C&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch=&bRegex=false&_=1418418256370 HTTP/1.1" 500 589 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"

Note the 500 error, which should be on error.log and with the php trace that's is happening on other errors.

Any clues?


When PHP display_errors are disabled, PHP errors can return Nginx 500 error.

Take a look into your php-fpm logs, i'm sure you'll find the error there. With CentOS 7 :

tail -f /var/log/php-fpm/www-error.log

You can finally show PHP errors. In /etc/php.ini, change :

display_errors = Off

to :

display_errors = On

Hope it helps.


Verify php-fpm service is running

sudo service php-fpm status

This will display the hostnames that can execute php.

Next edit php.ini to display errors. this will display errors on page..to make things easy to diagnose

sudo vim /etc/php.ini

then hit key [/] and type

display_errors

hit key [i] user arrow keys and backspace to set display_errors = on

then restart php-fpm service

On system type redhat /centos etc..

sudo service php-fpm restart
链接地址: http://www.djcxy.com/p/23752.html

上一篇: Java中处理第三方SSL证书的最佳实践

下一篇: fpm不会在任何地方记录500错误