0

I have copied the project folder from one hoisting to another, Created required database. Cake PHP app is not running. When debugging is ON it gives the following error. In earlier hoisting it is working fine. PLEASE HELP

Fatal error: Uncaught Error: Class 'Controller' not found in /home3/frenzo/public_html/frenzo/lib/Cake/Error/ExceptionRenderer.php:174

Stack trace:

#0 /home3/frenzo/public_html/frenzo/lib/Cake/Error/ExceptionRenderer.php(92): ExceptionRenderer->_getController(Object(FatalErrorException))
#1 /home3/frenzo/public_html/frenzo/lib/Cake/Error/ErrorHandler.php(126): ExceptionRenderer->__construct(Object(FatalErrorException))
#2 /home3/frenzo/public_html/frenzo/lib/Cake/Error/ErrorHandler.php(284): ErrorHandler::handleException(Object(FatalErrorException))
#3 /home3/frenzo/public_html/frenzo/lib/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(64, 'Cannot use 'Obj...', '/home3/frenzo/p...', 30)
#4 /home3/frenzo/public_html/frenzo/lib/Cake/Core/App.php(970): ErrorHandler::handleError(64, 'Cannot use 'Obj...', '/home3/frenzo/p...', 30, Array)
#5 /home3/frenzo/public_html/frenzo/lib/Cake/Core/App.php(943): App::_checkFatalError()
#6 [internal function]: App::shutdown()
#7 {main}

thrown in /home3/frenzo/public_html/frenzo/lib/Cake/Error/ExceptionRenderer.php on line 174
ndm
  • 59,784
  • 9
  • 71
  • 110
  • Please clear your error logs (`app/tmp/logs/`), run a request, and then check the logs again (please always copy errors from the logs, where they are available in a readable fashion), there's probably additional errors, and the one you've posted might be a result of earlier errors. Seeing the `'Cannot use 'Obj...'` string in the stacktrace , there might be a `Cannot use 'Object' as class name as it is reserved` error. – ndm May 31 '20 at 15:37
  • ps. please always mention your exact CakePHP version (last line in `lib/Cake/VERSION.txt` or `vendor/cakephp/cakephp/VERSION.txt`) - thanks! – ndm May 31 '20 at 15:37
  • 2020-05-31 23:32:55 Error: Fatal Error (64): Cannot use 'Object' as class name as it is reserved in [/home3/frenzo/public_html/frenzoadmin/lib/Cake/Core/Object.php, line 30] 2020-05-31 23:32:55 Error: [FatalErrorException] Cannot use 'Object' as class name as it is reserved Request URL: /frenzoadmin/ Stack Trace: #0 /home3/frenzo/public_html/frenzoadmin/lib/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(64, 'Cannot use 'Obj...', '/home3/frenzo/p...', 30) – Vineet Alinda May 31 '20 at 18:05
  • #1 /home3/frenzo/public_html/frenzoadmin/lib/Cake/Core/App.php(970): ErrorHandler::handleError(64, 'Cannot use 'Obj...', '/home3/frenzo/p...', 30, Array) #2 /home3/frenzo/public_html/frenzoadmin/lib/Cake/Core/App.php(943): App::_checkFatalError() #3 [internal function]: App::shutdown() #4 {main} – Vineet Alinda May 31 '20 at 18:05
  • Version is 2.8.3 – Vineet Alinda May 31 '20 at 18:07
  • i changed the folder name from /home3/frenzo/public_html/frenzo/ to /home3/frenzo/public_html/frenzoadmin. I thought name is clashing with domain – Vineet Alinda May 31 '20 at 18:10
  • As suspected, it's the reserved name, see **https://stackoverflow.com/questions/52981403/cannot-use-object-as-class-name-as-it-is-reserved-cake-2-2-x** – ndm May 31 '20 at 18:21

0 Answers0