Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR

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

share|improve this question
2  
I'd fix the warnings. I consider them nearly as much a bug as a fatal error would be. –  Alister Bulman Jan 3 '11 at 10:39

2 Answers 2

The setting should work.

php-fpm needs to be restarted as well, not only nginx.
Also, there are various startup (/etc/init.d/) scripts that do perform the right kill job when stopping php-fpm.

Try

  ps -ef | grep php

to get the executable name (like php5-fpm). Then

  killall php5-fpm

(or the name you have).

Then start php-fpm again.

share|improve this answer
    
do php assertion warnings count as errors? –  Incognito Jan 3 '11 at 19:46
    
Unlike the regular PHP warnings, the assertion warnings come from your own decision to have PHP to react on a given event. You can control this behavior using the assert_options() call. See tuxradar.com/practicalphp/19/8/3 –  ring0 Jan 9 '11 at 5:38

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.