[英]CakePHP Fatal Error Error: include(): Cannot redeclare class debugger - after moving to another server and PHP version
I've developed a CakePHP
application, based on version 2.3.0
. 我已经基于版本2.3.0
开发了一个CakePHP
应用程序。 The app was working on a server with PHP 5.3.3-7
version. 该应用程序正在使用PHP 5.3.3-7
版本的服务器上。
Now, the app has been moved to new environment, with PHP 5.4.34-1
version and it throws fatal error: 现在,该应用已移至PHP 5.4.34-1
版本的新环境,并引发致命错误:
Error: include(): Cannot redeclare class debugger File: /home/html/directory/lib/Cake/Core/App.php Line: 560 错误:include():无法重新声明类调试器文件:/home/html/directory/lib/Cake/Core/App.php行:560
Does anyone have a clue, what could cause this problem? 有谁有线索,什么可能导致这个问题? I know what such problem means (that I cannot redeclare a class), but I don't know how to fix it. 我知道这样的问题意味着什么(我不能重新声明一个类),但是我不知道如何解决它。
I know this is an old question, but since this coincided with moving to PHP v. 5.4, a likely fix is changing your Error level in the core.php file from 我知道这是一个老问题,但是由于这恰好是向PHP v。5.4的迁移,因此可能的解决方法是将core.php文件中的错误级别从
'level' => E_ALL & ~E_DEPRECATED,
to this 对此
'level' => E_ALL & ~E_DEPRECATED & ~E_STRICT,
PHP 5.4 includes E_STRICT in the E_ALL set, unlike previous versions. 与以前的版本不同,PHP 5.4在E_ALL集中包含E_STRICT。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.