cakephp2系をPHP7で動かそうとしたら出てきたエラー解消方法

cakephp2系をPHP7で動かそうとしたら出てきたエラー解消方法


Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /home/ナイショ!/www/lib/Cake/Cache/Cache.php on line 327
Warning: /home/ナイショ!/www/app/tmp/cache/persistent/ is not writable in /home/ナイショ!/www/lib/Cake/Cache/Engine/FileEngine.php on line 385
Fatal error: Uncaught CacheException: Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct in /home/ナイショ!/www/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /home/ナイショ!/www/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1
/home/ナイショ!/www/app/Config/core.php(376): Cache::config('_cake_core_', Array) #2 /home/ナイショ!/www/lib/Cake/Core/Configure.php(72): include('/home/ナイショ!/w...') #3
/home/ナイショ!/www/lib/Cake/bootstrap.php(431): Configure::bootstrap(true) #4 /home/ナイショ!/www/app/webroot/index.php(95): include('/home/ナイショ!/w...') #5 {main} thrown in /home/ナイショ!/www/lib/Cake/Cache/Cache.php on line 186

$ chmod -R 777 tmp/
参考 :[CakePHP] Warning: _cake_core_ cache was unable to write エラーの対処方法 | Search Light(CakePHP PHP jQuery JavaScript CSS Linux MySQLMac)



Fatal error: Uncaught Error: Class 'Controller' not found in /home/ナイショ!/www/lib/Cake/Error/ExceptionRenderer.php:177 Stack trace: #0 /home/ナイショ!/www/lib/Cake/Error/ExceptionRenderer.php(95): ExceptionRenderer->_getController(Object(FatalErrorException)) #1 /home/ナイショ!/www/lib/Cake/Error/ErrorHandler.php(126): ExceptionRenderer->__construct(Object(FatalErrorException)) #2 /home/ナイショ!/www/lib/Cake/Error/ErrorHandler.php(284): ErrorHandler::handleException(Object(FatalErrorException)) #3 /home/ナイショ!/www/lib/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(64, 'Cannot use 'Obj...', '/home/ナイショ!/w...', 30) #4 /home/ナイショ!/www/lib/Cake/Core/App.php(970): ErrorHandler::handleError(64, 'Cannot use 'Obj...', '/home/ナイショ!/w...', 30, Array) #5 /home/ナイショ!/www/lib/Cake/Core/App.php(943): App::_checkFatalError() #6 [internal function]: App::shutdown() #7 {main} thrown in /home/ナイショ!/www/lib/Cake/Error/ExceptionRenderer.php on line 177
下のサイトから、lib以下をダウンロードして上書き
GitHub - cakephp/cakephp at 2.x
参考:PHP7でCakePHP2.xを動かす | idealive tech blog



f:id:harucharuru:20210322182935p:plain
そうだ!前のサイトは、SSL化してたんだった!
ということでSSL化します。


できた!!!!!