with nginx with php-fpm, how do i turn off php warnings in the error log of nginx?

Incognito asked:

I’m running nginx with php-fpm and php 5.3.3. I have in my php.ini config


Which should turn off all php warnings in the error log but I’m still getting them. How do I get rid of them?

My answer:

Edit your php-fpm pool configuration to specify an alternate path to log to.

An example: You can edit /etc/php-fpm.d/www.conf and add something like:

php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on

Or you can turn logging off, but that’s a really bad idea.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.