Zhmchen
Zhmchen

Reputation: 5

When I opened the project,I get back this error message

When I opened the project,I get back this error message :

Fatal error: Uncaught Error: Class 'String' not found in /dev/local/lib/Cake/Utility/Debugger.php:339 Stack trace: #0 /dev/local/lib/Cake/Utility/Debugger.php(741): Debugger::trace(Array) #1 /dev/local/lib/Cake/Error/ErrorHandler.php(219): Debugger->outputError(Array) #2 /dev/local/lib/Cake/Core/App.php(565): ErrorHandler::handleError(2, 'Declaration of ...', '/dev/local...', 25, Array) #3 /dev/local/lib/Cake/Core/App.php(565): include() #4 [internal function]: App::load('TradeLog') #5 [internal function]: spl_autoload_call('TradeLog') #6 /dev/local/lib/Cake/Utility/ClassRegistry.php(145): class_exists('TradeLog') #7 /dev/local/app/Controller/Component/UserComponent.php(61): ClassRegistry::init('TradeLog') #8 /dev/local/app/Controller/Component/PlatformAgentComponent.php(24): UserComponent->__construct(Object(ComponentCollection), Array) #9 /Us in /dev/local/lib/Cake/Utility/Debugger.php on line 339

The newly configured environment in mac os.

When I paste the project into a folder, this error occurs. What's the matter?

Upvotes: 0

Views: 895

Answers (2)

MarcoB
MarcoB

Reputation: 99

You need to upgrade to CakePHP > 2.8 which is compatible with PHP7 https://github.com/cakephp/cakephp/releases/2.8.0

Upvotes: 0

Jirka Hrazdil
Jirka Hrazdil

Reputation: 4021

This is a compatibility issue between Cakephp 2.4 and PHP7 (because string became reserved word in PHP7, so Cakephp cannot use it as a class name). Using of newer version of Cakephp is suggested. Also downgrading your PHP to 5.6 could solve the problem.

Upvotes: 1

Related Questions