views:

143

answers:

4

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?

+2  A: 

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');
karim79
I think I have set it right.. Any thing else which could have created the problem
Arkid
I had change some paths in the index.php
Arkid
A: 

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.

Alister Bulman
A: 

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 ;-)

phidah
A: 

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