dongxinyue2817 2013-10-31 17:15
浏览 100
已采纳

display_errors设置为On但在phpinfo()中显示Off

I'm on OS X 10.9 (though, it was the same in 10.8)

I'm trying to get display_errors set to On but can't figure it out. I didn't have a php.ini file in /etc so I copied /etc/php.ini.default cp /etc/php.ini.default /etc/php.ini.

I then went into /etc/php.ini and uncommented the line display_errors and set it to On - display_errors=On. Saved the file and went to phpinfo().

For "Configuration File (php.ini)" Path it shows "/etc" and for "Loaded Configuration File" it shows "/etc/php.ini" so I assume that means it's using the correct php.ini file right?

But, when I scroll down in phpinfo() it shows "display_errors" as Off for both Local Value and Master Value.

What am I doing wrong? Is there another place I need to turn display_errors On? I'm using PHP 5.4.17

Edit: Forgot to mention that I've restarted apache several times with sudo apachectl restart and still no change.

Also, I found it weird that before I copied php.ini.default to /etc/php.ini, php was presumably using some default php.ini file but display_errors was still set to Off. Isn't that On by default?

  • 写回答

1条回答 默认 最新

  • douwen3198 2013-10-31 17:27
    关注

    h2ooooooo got it figured out. I uncommented the wrong section to set it to On. It was turing back off later down the page. All good now.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)