更新到php 5.4.9后出现静态标准错误

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了更新到php 5.4.9后出现静态标准错误脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我将 PHP更新到版本5.4后出现以下错误
Strict Standards: Non-static method Debugger::invoke() should not be called statically,assuming $this From incompatible context in /usr/share/PHP/cake/libs/debugger.PHP on line 575 
Strict Standards: Non-static method Debugger::getInstance() should not be called statically,assuming $this from incompatible context in /usr/share/PHP/cake/libs/debugger.PHP on line 575

我已经尝试过以下解决方

Error while Disabling error reporting in CakePHP

Cakephp doesn’t work after installing php5-curl package(无法找到“Cake”文件夹,因为我已经烘焙了我的项目)

Wampserver cakephp 1.3 Strict standards error

How to eliminate php5 Strict standards errors?

PHP 5 disable strict standards error

https://stackoverflow.com/questions/11799085/turn-off-php-strict-standards?lq=1(无法关闭错误)

每次更改后清除蛋糕缓存,Web浏览器缓存,Cookie和重新启动的服务器.甚至尝试过私密浏览和chrome,firefox,也就是.

我相信这是因为这个应用程序是基于较旧版本的CakePHP构建的,它可能会使用一些不推荐使用的函数.
如果您(或其他人)可以将Cake升级到新的稳定分支,那将是非常棒的.
截至目前,在您的core.PHP中尝试此操作,您可以从错误报告中删除E_STRICT:

即转到app / Config / core.PHP查找

Configure::wrITe('Error',array(
    'handler' => 'ErrorHandler::handleError','level' => E_ALL & ~E_DEPRECATED,'trace' => true
));

把它换成

Configure::write('Error','level' => E_ALL & ~E_STRICT & ~E_DEPRECATED,'trace' => true
));

脚本宝典总结

以上是脚本宝典为你收集整理的更新到php 5.4.9后出现静态标准错误全部内容,希望文章能够帮你解决更新到php 5.4.9后出现静态标准错误所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。