0

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?

Timothy
  • 2,004
  • 3
  • 23
  • 29
André Luiz
  • 6,642
  • 9
  • 55
  • 105
  • 1
    Maybe `AdminproductController` must be called `AdminProductController`,<- foregt this, thing is a deeper issue – JustOnUnderMillions Sep 02 '16 at 14:17
  • 1
    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 Sep 02 '16 at 14:19
  • 1
    How are you routing to your "admin product controller" ? `adminproduct` or `admin-product` or `...` – Timothy Sep 02 '16 at 14:20
  • @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 Sep 02 '16 at 14:24
  • @AndréLuiz seems like [an XY-problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) to me :p – Timothy Sep 02 '16 at 14:32

1 Answers1

1

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.

Timothy
  • 2,004
  • 3
  • 23
  • 29
JustOnUnderMillions
  • 3,741
  • 9
  • 12
  • Thanks, actually it is the contrary. It was AdminProductController.php " renamed the file to AdminproductController.php and it worked. – André Luiz Sep 02 '16 at 14:33