Arc
Arc

Reputation: 1700

Zend framework web app not coming up?

I am trying to get a web app made on Zend Framework up but am encountering this error

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/worm/index.php on line 17

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='/var/worminc/application/../library') in /var/www/worm/index.php on line 17

Please suggest the possible solutions?

Upvotes: 0

Views: 252

Answers (4)

mctom987
mctom987

Reputation: 892

The web server also needs read access to the folder, so make sure it can read from it.

Upvotes: 0

fiskah
fiskah

Reputation: 5902

Be aware that when adding the ZF path to your include_path, you must ensure that you really add the path instead of just overwrite the current include path.

From the text in your errors it looks like you've overwritten the current directory from your include path. The correct way is to do it like karim79 said:

set_include_path($PATH_TO_ZEND_FRAMEWORK . PATH_SEPARATOR . get_include_path());

This is really not an answer, just a tip ;-)

Upvotes: 0

Alister Bulman
Alister Bulman

Reputation: 35169

If the system cannot find something - first you have to find out where it is looking for it.

echo get_include_path(), "\n"; die;

Look in the directories it shows, and if the directory 'Zend/' is not there, you know what is wrong.

Upvotes: 0

karim79
karim79

Reputation: 342655

I don't think you've configured your LIB_PATH correctly. At the top of your bootstrap put:

define('LIB_PATH', '/full/path/to/Library'); //Zend Framework is in Library
set_include_path(LIB_PATH . PATH_SEPARATOR . get_include_path());
require_once('Zend/Loader.php');

Upvotes: 2

Related Questions