I am getting an error saying missing controller after migrating from cakephp 1.3 to 2.0

StackOverflow https://stackoverflow.com/questions/13306321

  •  28-11-2021
  •  | 
  •  

문제

I migrated from cakephp 1.3 to cakephp 2.2.3. But i am getting an error 'Missing Controller'. Its asking me to check in "/app/controller.." but i dont have a folder named 'controller'. After converting i have a folder named as 'Controller'

So please help me to solve this issue..

Thanks in advance

도움이 되었습니까?

해결책

I just switched to CakePHP1.3 to CakePHP2.2.3.

Regarding controllers, the old app/app_controller.php was moved to app/Controller/AppController.php.

It's the same for models, app/app_model.php was moved to app/Model/AppModel.php.

The Controller and Model folders start with an uppercase letter now.

Also, the controller/model names are not using _ anymore and are named using uppercase letters: instead of app/controller/users_controller.php, you will have app/Controller/UsersController.php.

My best advice would be to start with an empty CakePHP2.2.3 project and copy your older project files in their corresponding folders.

You can also take a look at the migration guide here:

http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html

There are some improvements in CakePHP2 that you should know about (like the lazy loading of classes which improves performance, deprecated components, etc.).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top