Is there any way to disable error logging in php5-fpm
?
I changed the /etc/php5/fpm/php.ini
file with:
log_errors = Off
display_errors = Off
and restarted php5-fpm
.
My nginx
logfiles are still full of php warnings.
Is there any way to disable error logging in php5-fpm
?
I changed the /etc/php5/fpm/php.ini
file with:
log_errors = Off
display_errors = Off
and restarted php5-fpm
.
My nginx
logfiles are still full of php warnings.
Edit php-fpm.conf and set error_log=
to empty, or /dev/null.
It's Nginx that is logging these errors.
Taken from http://wiki.nginx.org/CoreModule:
Note that error_log off does not disable logging - the log will be written to a file named "off". To disable logging, you may use:
error_log /dev/null crit;
in your nginx.conf file, usually located in /etc/nginx/nginx.conf
Check your php-fpm configuration for:
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
And comment this out.
It's Nginx not php who write this log. You need to edit your nginx config to log only critical error (note that you cannot disable error logging, but you can change the log level). And note that you should fix errors instead of hide them ^^