Fabio
Fabio

Reputation: 33

Zend include_once(myphpfile): failed to open stream: No such file or directory

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.

Upvotes: 1

Views: 2133

Answers (1)

Garry Welding
Garry Welding

Reputation: 3609

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...

Upvotes: 2

Related Questions