debian php 日志,PHP 5.3.9 log_errors无法正常工作,无法在Debian Lenny中的日志文件中保存错误...

我想在我的php ini文件中关闭生产环境中的display_errors并将错误保存在日志文件中.在尝试了几个小时没有成功之后,我决定寻求建议.

我做了什么:

在根据PHP信息加载的ini文件中:

display_errors = Off

log_errors = On

error_log = /var/log/apache2/php.errors

error_reporting=E_ALL

(file exists, is writable and chown to apache user www-data)

重新启动Apache

生成致命错误,函数未定义.

检查日志文件,但未保存任何内容,日志文件为0kb

在phpinfo()中,我有error_reporting = 30711

有什么建议么?我错过了什么?

谢谢

解决方法:

创建一个可从Apache写的目录.试试这个

mkdir /var/log/php

chown www-data /var/log/php

在php.ini中

error_log = /var/log/php/php_errors.log

记住旋转/var/log/php/php_errors.log

标签:logging,apache,php

来源: https://codeday.me/bug/20191201/2083645.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值