doulan3966 2016-02-10 14:21
浏览 61

PHP error_log()不会记录到php.ini中指定的文件

I am using php5 with apache 2 on Ubuntu. I set the error_log in the php.ini to where I want php errors logged, and removed the ErrorLog directive from the apache virtual host configuration file.

PHP creates the file and logs to that file only when I use error_log() with the 3 argument version, adding the path to the log file as the third argument. But, when I use error_log() with a single string argument, it logs to the apache2 default error log.

Permissions seem to be fine. That is the only php.ini file used according to php -i.

Any idea what am I missing?

Thanks.

  • 写回答

1条回答 默认 最新

  • doukai2839 2016-02-14 15:19
    关注

    @CBore - Thanks that was exactly the problem. Once I viewed the output of phpinfo() from the webserver I saw it was using a different php.ini.

    Thank you very much for pointing that out.

    评论

报告相同问题?

悬赏问题

  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。