2

当我尝试在 PHP 5.4.12 和 Apache 2.4.4 下运行 cakephp 应用程序(版本 1.3.4)时出现严格标准错误。我现在无法升级应用程序的 cakephp 版本。我在网上尝试了所有建议的解决方案,但没有任何效果(比如在 bootstrap.php 中设置 error_reporting 等......)。有没有人设法解决这个问题?如果是这样,请告诉我。

谢谢

4

4 回答 4

1

您可以在 cake 库中进行代码搜索,并找到设置“error_reporting”的位置,您会找到一些,并将该值设置为“E_ALL & ~E_DEPRECATED & ~E_STRICT”,这将解决问题。

例如,您可能想查看 cake/libs/configure.php,

于 2013-12-25T00:03:07.120 回答
1

Take my opinion. Cakephp 1.3.4 does not work properly for versions higher than PHP 5.3.3. So do not try to run cakephp 1.3.4 with PHP 5.4. Either downgrade PHP OR upgrade CAKEPHP. But if you are going for upgrading CAKEPHP, be very very very careful. Up gradation of CAKEPHP sucks big time. I have recently did it in my project and believe me its really time consuming and difficult.

And if you still want to run the CAKEPHP 1.3.4 with PHP 5.4 then refer following link Disabling Strict Standards in PHP 5.4

于 2014-02-01T15:50:28.937 回答
1

我刚刚在将 cakephp 0.2.9 迁移到 PHP 5.5.9 时遇到了这些错误消息。把线放在下面

error_reporting( ~E_STRICT & ~E_DEPRECATED );

在文件 cake\libs\object.php 中,就在 class Object 语句之前。这个对我有用。

于 2014-07-16T03:33:46.940 回答
0

此时您唯一可以做的就是禁用 php.ini 中的 STRICT 消息

作为参考,看看这个:Disabling Strict Standards in PHP 5.4

于 2013-11-07T20:43:54.640 回答