0
votes

I have an application written in Phalcon 2. This application runs locally normally, everything works. My problem is to make it run on an Amazon Ec2 Linux server. Some controllers work normally, the routes are OK.

My problem is with some controller inside the admin area. Not all controllers give me errors, some work. This is the error I get:

AdminproductController handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('AdminproductCon...', 2)
#1 [internal function]: Phalcon\Dispatcher->_dispatch()
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 /var/www/html/public/index.php(31): Phalcon\Mvc\Application->handle()
#4 {main}

I've been reading about this error on Phalcon's forum and so far none of the answers solve my issue yet. What I'm trying to do is check if it is a case sensitive problem. But no matter what I do, the controller never loads and the error messages are always the same.

Would you have some tips, like steps or a checklist, for me to follow to try to fix this issue?

1
Maybe AdminproductController must be called AdminProductController,<- foregt this, thing is a deeper issue - JustOnUnderMillions
The docs tell us that: "Controller names are camelized, this means that characters (-) and (_) are removed and the next character is uppercased. For instance, some_controller is converted to SomeController." - Timothy
How are you routing to your "admin product controller" ? adminproduct or admin-product or ... - Timothy
@JustOnUnderMillions Thanks, actually it is the contrary. It was AdminProductController.php " renamed the file to AdminproductController.php and it worked. Please post an answer so I can give you the points =] - André Luiz
@AndréLuiz seems like an XY-problem to me :p - Timothy

1 Answers

1
votes

Maybe AdminproductController must be called AdminProductController or a class file was renamed and you have to change the usage of the class. Also read @Timothy's comments.