嘟嘟社区

lnmp怎么开启PHP的错误日志来着?我试了下没反应。。


用的军哥的lnmp一键安装,在配置Discuz后台的时候,提交后提示 500 Internal Server Error

然后修改配置文件:/usr/local/php/etc/php-fpm.conf
新增了最后两行,再 /etc/init.d/php-fpm restart
然后手动创建了日志文件:
touch /usr/local/php/var/log/php_errors.log && chown www:www /usr/local/php/var/log/php_errors.log
再次进Discuz后台,编辑报错500,然后日志文件还是0

[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

[www]
listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 6
pm.max_requests = 1024
pm.process_idle_timeout = 10s
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
php_admin_value[error_log] = /usr/local/php/var/log/php_errors.log
php_admin_flag[log_errors] = on