Zend Framework Include Path

For programming and general questions on Zend Framework
Post Reply
Posts: 1
Joined: Thu Dec 13, 2012 3:15 pm

Zend Framework Include Path

Post by riaanp » Fri Dec 21, 2012 9:09 am

Good Day,

I see this has been asked a lot in the internet, but no clear way to resolve it. I am hoping someone here can help..

Warning: require_once(library/Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\htdocs\live\db_test.php on line 7

Fatal error: require_once() [function.require]: Failed opening required 'library/Zend/Loader.php' (include_path='.;C:\zend\ZendServer\share;C:\zend\ZendServer\share\ZendFramework\library;C:\htdocs') in C:\htdocs\live\db_test.php on line 7

It would appear that the paths are messed up, but I did change the include paths. Jut does not find any php includes.

Sample Code Used:

echo getcwd();

require_once( "library/Zend/Loader.php" );

$test = new Zend_Config_Ini();

or die("no");


The damin.php file is in the SAME directory as the test_db.php file (code above), the Loader.php is in a completely different location.

Any suggestions?

User avatar
Zend Global Support
Posts: 994
Joined: Sun Dec 14, 2008 9:48 am

Re: Zend Framework Include Path

Post by zvika » Fri Dec 21, 2012 1:19 pm


This is a question on ZF Include Path, so I modified the subject and moved it to ZF forum for better orientation.

You tried to require 'library/Zend/Loader.php', so with your include path, PHP will fail to locate 'C:\zend\ZendServer\share\ZendFramework\library\library\Zend\Loader.php'.

The include path is fine, however you should require 'Zend/Loader.php' (instead of referencing 'library' twice).

Hope this helps,
please report back with any results.
Zvika Dror
Zend Support Team

Post Reply