A similar question has been asked already at PHP's configuration setting 'error_log' is not working, but that's not my problem.
My phpinfo();
shows
Directive | Local Value | Master Value |
---|---|---|
error_log | /var/opt/remi/php74/log/php-fpm/www-error.log | /var/opt/remi/php74/log/php-fpm/www-error.log |
max_execution_time | 456 | 456 |
I try to change location to /var/log/php-fpm/www-error.log
, however the location always stays on /var/opt/remi/php74/log/php-fpm/www-error.log
not matter what I am doing
File /etc/php.d/impng.ini
max_execution_time = 456
error_log = /var/log/php-fpm/www-error.log
I run systemctl restart httpd
/ systemctl restart php74-php-fpm
several times
I don't see file /var/opt/remi/php74/log/php-fpm/www-error.log
configured anywhere:
$ grep php_admin_value /etc/httpd/conf/*
$ grep php_admin_value /etc/httpd/conf.d/*
$ grep php_admin_value /etc/httpd/conf.modules.d/*
$ grep php_admin_value /etc/php.d/*
$ grep error_log /etc/php.d/*
/etc/php.d/impng.ini:error_log = /var/log/php-fpm/www-error.log
$ grep ErrorLog /etc/httpd/conf/*
/etc/httpd/conf/httpd.conf:# ErrorLog: The location of the error log file.
/etc/httpd/conf/httpd.conf:# If you do not specify an ErrorLog directive within a <VirtualHost>
/etc/httpd/conf/httpd.conf:ErrorLog "logs/error_log"
$ grep ErrorLog /etc/httpd/conf.d/*
/etc/httpd/conf.d/ssl.conf:ErrorLog logs/ssl_error_log
$ grep ErrorLog /etc/httpd/conf.modules.d/*
Note, errors are written properly to /var/opt/remi/php74/log/php-fpm/www-error.log
. Manual logging with error_log("test", 3, "/var/log/php-fpm/www-error.log");
is also working.
But I don't manage to change the location of error_log
. Other parameters (e.g., max_execution_time
) are taken properly into account as expected.
It's a minor issue. I could create symbolic link or simply read file /var/opt/remi/php74/log/php-fpm/www-error.log
. However, I wonder why I cannot change it.