Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CakePHP2.6.3不适用于PHP7_Cakephp_Cakephp 2.0_Php 7_Apache2.4 - Fatal编程技术网

CakePHP2.6.3不适用于PHP7

CakePHP2.6.3不适用于PHP7,cakephp,cakephp-2.0,php-7,apache2.4,Cakephp,Cakephp 2.0,Php 7,Apache2.4,致命错误:未捕获错误:在/var/www/html/hrportal/lib/Cake/Utility/Debugger.php:340中找不到类“String” 堆栈跟踪: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

致命错误:未捕获错误:在/var/www/html/hrportal/lib/Cake/Utility/Debugger.php:340中找不到类“String” 堆栈跟踪: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):errorhandleerror::handleError(8,“未定义索引…”,“/var/www/html/h…”,72,Array)3/var/www/html/hrportal/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->->启动流程()6/var/www/html/hrportal/lib/Cake/Error/ExceptionRenderer.php(92):ExceptionRenderer->\u getController(Object(FatalErrorException))7/var/www/html/hrportal/lib/Cake/Error/ErrorHandler.php(126):ExceptionRenderer->\u构造(Object(FatalErrorException))8 in/var/www/html/hrportal/lib/Cake/Utility/Debugger.php,第340行

这个错误是在我将系统升级到PHP7.0时出现的

我有一个CakePHP应用程序,它在5.5.9上运行得非常好, 现在这个错误来了,请帮助

如果不想使用3.x,请尝试CakePHP2.9版本


CakePHP2.6与PHP7不兼容
根据CakePHP2.x文档,PHP7必须使用2.9.x。下面是PHP 对于cakephp2.x

PHP5.3.0或更高版本(CakePHP 2.6及以下版本支持PHP5.2.8 及以上)。CakePHP 2.8.0及以上版本支持PHP7。使用PHP 在7.1以上,您可能需要通过PECL安装mcrypt。有关详细信息,请参见安全性 更多信息


我有同样的issue@SandipGhadge安装5.6它会让你工作。我已经改回PHP5.6,然后错误也不会发生。让它工作,现在我已经安装了PHP5.6和PHP7,当我切换到PHP5.6时,它现在工作良好, Thanks@AyushPant然后请接受答案,以帮助他人理解它解决了您的问题。已经有一个答案正是这个内容。为什么要添加副本?