Reputation: 173
After developing my Zend Framework 2 website in local, I just bought a hosting and deployed it, but can't get it to work!
First of all, my hosting service doesn't allow me to use the public folder as root, so I found this solution (adding an index.php to the root that includes the public/index.php, and an .htaccess that redirects everything to it):
ZF on shared host
I tested it in local, and works great, and I can access it from both mysite.loc and mysite.loc/public
However, on remote it doesn't work, and looks like it can't find the classes:
Fatal error: Class 'Zend\MVC\Controller\AbstractActionController' not found in /web/htdocs/www.mysite.com/home/module/Cycling/src/MyModule/Controller/IndexController.php on line 8
I'm getting crazy and really need some help, what could be the problem if even from root it works in local?
Upvotes: 0
Views: 42
Reputation: 33148
Zend\MVC\Controller\AbstractActionController
is not the correct class name, it should be Zend\Mvc\Controller\AbstractActionController
(note the case of 'Mvc'). I'm guessing you developed the site on a case-insensitive file system (such as OS X or Windows), which is why you are only seeing this problem on your shared server.
Upvotes: 4