0

On my Nginx server in /var/log there is php5-fpm.log and php_error.log The php_error.log has all kind of notices so that it's size grows to hundreds of Mb's. I tried to find which php.ini managed this file, but no luck.

php --ini

gives:

Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      
/etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-apcu.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-geoip.ini,
/etc/php5/cli/conf.d/20-horde_lz4.ini,
/etc/php5/cli/conf.d/20-intl.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-ldap.ini,
/etc/php5/cli/conf.d/20-mcrypt.ini,
/etc/php5/cli/conf.d/20-memcache.ini,
/etc/php5/cli/conf.d/20-mongo.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-pdo_sqlite.ini,
/etc/php5/cli/conf.d/20-pspell.ini,
/etc/php5/cli/conf.d/20-readline.ini,
/etc/php5/cli/conf.d/20-sasl.ini,
/etc/php5/cli/conf.d/20-sqlite3.ini,
/etc/php5/cli/conf.d/20-tidy.ini,
/etc/php5/cli/conf.d/20-xdebug.ini,
/etc/php5/cli/conf.d/20-xmlrpc.ini

The /etc/php5/cli/php.ini is set to

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

From the browser, phpinfo(); says that /etc/php5/fpm/php.ini is used, this is also set to error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

After setting this values I did a sudo service php5-fpm restart

Still all kind of notices and stack traces, Any idea where this logfile comes from?

C.A. Vuyk
  • 642

1 Answers1

1

Hi you first need to check which php-fpm.conf file the php-fpm service is using.

sudo ps -aux | grep "php-fpm"

It will show the configuration file it is using.

Go to that path. e.g. /etc/php5/fpm and edit php-fpm.conf to disable logging.

Inside /etc/php5/fpm/www there is another .conf file disable logging on that too.

dkakoti
  • 191