1
votes

this problem is driving me nuts. I know similar problems has already been submitted but no solution worked for me

I'm getting this error:

Warning: include_once(): Failed opening 'Recruit/Model/DbTable/Volontari.php' for inclusion (include_path='/var/www/html/fabio/recruit/application/../library:/var/www/html/fabio/recruit/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php

But actually file exists on server. This is part of my folder tree

source
  |__application
        |_ ....
  |__library
        |__Recruit
             |__Forms
             |   |__VolontariCreate.php
             |__Model
                 |__DBTable
                       |__Volontari.php

Form VolontariCreate.php works, so I don't think it can't find the path.

I also checked include paths with echo get_include_path(); and they're correct

If it can help, client is Ubuntu, server is Centos, zend version is 1.12.17dev

Thanks for your support.

1
Where is the 'Recruit' folder located? It's in the file string, but not in the tree. Is recruit your application? It looks like perhaps you need to add an additional '../' to your path. Also possible case issue with the autoloader looking for a capital 'R' on the namespace/classloader - Tim Ogilvy
Yes, recruit is my application. Sorry, Recruit folder was missing in tree, I edited. Now tree is correct. In application.ini I declared namespace "Recruit_". - Fabio
try dumping __DIR__ to see where you are in your actual file tree. - Tim Ogilvy
OK. I will try this evening (I'm at work now) - Fabio
Error was on path name different from class name - Fabio

1 Answers

2
votes

I believe your problem is that linux/unix file systems are case sensitive. On servers running Windows you can get away with whatever file case you fancy as they are case insensitive. As such your request to include:

Recruit/Model/DbTable/Volontari.php

Will fail because the actual path should be:

Recruit/Model/DBTable/Volontari.php

Notice the capital B in DB...