0

In order to have only one .log file related with php issues, I want to force php-fpm to write errors in /var/log/php-fpm/error.log instead of /var/log/php-fpm/www-error.log.

I just updated /etc/php-fpm.d/www.conf and also /etc/php.d/10-opcache.ini and restarts php-fpm service, but I still getting errors in /var/log/php-fpm/www-error.log.

/etc/php-fpm.d/www.conf

...
; Default Value: nothing is defined by default except the values in php.ini and
;                specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
;php_flag[display_errors] = off
;Comment by ME : php_admin_value[error_log] = /var/log/php-fpm/www-error.log
;Next line added by ME
php_admin_value[error_log] = /var/log/php-fpm/error.log
...

/etc/php.d/10-opcache.ini

...
; OPcache error_log file name. Empty string assumes "stderr".
; Comment by ME : opcache.error_log = /var/log/php-fpm/www-error.log
; Next line added by ME
opcache.error_log = /var/log/php-fpm/error.log
...

I'm on Rocky Linux 9.1

What am I missing?

2
  • Welcome, please edit the question adding the snippets of your configuration and what OS you are running, I guess is RHEL related? Commented Apr 24, 2024 at 14:17
  • @schrodingerscatcuriosity. Thanks. Please, could you take a look if question is now better formatted? Commented Apr 25, 2024 at 8:16

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.