Search code examples
phpwindowszend-frameworkinclude-path

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


Solution

  • Remove Zend from the path...

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

    Zend looks for Zend/etc whenever it loads stuff.