从7.1升级到7.2后,PHP-FPM不写入日志。
在conf文件下面。环境是CentOS,Nginx。
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 128M
; Set data paths to directories owned by process user
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/fpm/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/fpm/wsdlcache
;php_value[opcache.file_cache] = /var/lib/php/fpm/opcache
答案 0 :(得分:0)
在www.conf
catch_workers_output = yes
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
此外,别忘了创建一个日志文件,因此php-fpm可以在上面写:
touch /var/log/fpm-php.www.log && chmod 777 /var/log/fpm-php.www.log