Why is PHP still displaying errors?

元气小坏坏 提交于 2019-12-24 11:36:04

问题


Recently upgrading to PHP 5.3 has resulted in a slew of depreciation errors being shown on my pages. In php.ini I have display_errors off and error_reporting = E_ALL ^ E_DEPRECATED, but the errors still show. Ideas?


回答1:


Your script could be setting the error reporting level differently. Preferably at the end of the page that's having problems run:

phpinfo();

It will give you the global, and local values for display_errors. It's likely been turned on at some point.

If you establish that it's being turned back on, you'll need to find where it's turned back on, and remove that. Searching for ini_set() within your project will probably help.




回答2:


In order to apply this sort of change, you have to reload apache.




回答3:


restart PHP and execute script like this:

<?php
  phpinfo();
?>

to confirm changes



来源:https://stackoverflow.com/questions/5526983/why-is-php-still-displaying-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!