0

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi! Wow, quick answer. :-) Well, Lintottar is not my library but my module. My application directory structure looks like this (showing the two classes that are not found): application - modules - lintottar - controllers - forms - ad - search - Simple.php - models - resources - Ad.php - services - views Thanks for your time!
Here's my bootstrap if that might help you help me. :) pastie.org/1120001
Fantastic! That was what was the problem. Thank you very much! Now I'm going to look through all the folder names. Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.