zend-frameworkzend-autoloaderzend-applicationzend-app-bootstrap

Zend Framework Autoloading not working when deploying


My Zend based website works perfectly on my localhost (using Mac). But When I deploy it on a linux web hosting company, I get the following errors:

On the index page which try to list my ads by calling a resource where the select is:

Fatal error: Class 'Lintottar_Model_Resources_Ad' not found in /www/webvol8/4v/7e33wem4920cqpg/lintottar.se/library/My/Model/Abstract.php on line 79

On another page the view helper seems to be running - the main layout is rendered, but I get the following error: Fatal error: Class 'Lintottar_Form_Search_Simple' not found in /www/webvol8/4v/7e33wem4920cqpg/lintottar.se/application/modules/lintottar/views/helpers/SearchForm.php on line 16

Here is my application ini:

http://pastie.org/1119934

Is there a problem with the auto loading? What could I do? I can't understand what's wrong since it works on my local computer.

Thank you for your help!

KR

Josef


Solution

  • Ah I see what the problem is after you showed your directory structure. The problem is that those directories (like resources and ad and search) should be uppercase (eg. Resources). The reason why it works on your Mac is because although OS X is UNIX-based and case-sensitive, if it doesn't find a matching filename, it'll try it case-insensitive.

    So basically change your folder names to reflect the actual class names, and it should work. Do note that the root folders in the module directory such as models, forms, controllers and views should still be lower-case. The module resource autoloader is setup this way.