CakePhp 2.6.3 无法在 PHP 7 上运行

CakePhp 2.6.3 Not Working on PHP 7

致命错误:未捕获错误:Class 'String' 未在 /var/www/html/hrportal/lib/Cake/Utility/Debugger.php:340 中找到 堆栈跟踪:0 /var/www/html/hrportal/lib/Cake/Utility/Debugger.php(742): Debugger::trace(Array)1 /var/www/html/hrportal/lib/Cake/Error/ErrorHandler.php(229): Debugger->outputError(Array) /var/www/html/hrportal/app/Controller/AppController.php(72): ErrorHandler::handleError(8, 'Undefined index...', '/var/www/html/h...', 72, 数组) 3 /var/www/html/h rportal/lib/Cake/Event/CakeEventManager.php(243): AppController->beforeFilter(Object(CakeEvent)) 4 /var/www/html/hrportal/lib/Cake/Controller/Controller.php(676): CakeEventManager->dispatch(Object(CakeEvent)) 5 /var/www/html/hrportal/lib/Cake/Error/ExceptionRenderer.php(154): Controller->startupProcess() 6 /var/www/html/hrportal/lib/Cake /错误/ExceptionRenderer.php(92): ExceptionRenderer->_getController(Object(FatalErrorException)) 7 /var/www/html/hrportal/lib/Cake/Error/ErrorHandler.php(126): ExceptionRenderer->__construct(Object(FatalErrorException) )) 8 在/var/www/html/hrportal/lib/Cake/Utility/Debugger.php 在线340

我将系统升级到 PHP 7.0.

时出现此错误

我有 CakePHP 应用程序,它在 5.5.9 上完美运行, 现在这个错误来了,请帮助。

try cakephp 2.9 release if you don't want to use 3.x

CakePHP 2.6 与 PHP 7 不兼容 https://book.cakephp.org/2.0/en/installation.html

对于 PHP 7 你必须使用 2.9.x

根据 Cakephp 2.x 文档。以下是 PHP Requirements 对于 Cakephp 2.x

PHP 5.3.0 or greater (CakePHP version 2.6 and below support PHP 5.2.8 and above). CakePHP version 2.8.0 and above support PHP 7. To use PHP above 7.1 you may need to install mcrypt via PECL. See Security for more information.