Tural Ali
Tural Ali

Reputation: 23240

Zend Framework setup issue

Trying to setup Zend Framework as instructed in this manual

$paths = array(
    realpath(dirname(__FILE__) . '/libs/Zend'),
    '.',
);
set_include_path(implode(PATH_SEPARATOR, $paths));
require_once 'Zend/Loader.php';

Gives fatal error. (My local webserver is IIS. Remote one is linux)

Local:

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='D:\Web Server\tural.us\core\serverside\libs\Zend;.') in D:\Web Server\tural.us\core\content\pages\utube.php on line 2

Remote:

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='/home/tural/public_html/core/serverside/libs/Zend:.') in /home/tural/public_html/core/content/pages/utube.php on line 2

But in fact, I see that the path in error message is totally right : D:\Web Server\tural.us\core\serverside\libs\Zend;

enter image description here

Upvotes: 0

Views: 204

Answers (2)

nnevala
nnevala

Reputation: 5997

I think your inclusion of /Zend in the include path is causing the problem. Try:

$paths = array(
    realpath(dirname(__FILE__) . '/libs'),
    '.',
);

Upvotes: 1

aknosis
aknosis

Reputation: 4308

Remove Zend from the path...

realpath(dirname(__FILE__) . '/libs/')

Zend looks for Zend/etc whenever it loads stuff.

Upvotes: 3

Related Questions