Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Wrong path #1

cebe opened this Issue · 10 comments

4 participants


comment by zang on yiiframework

When I want to use this extension, I got an error:

include_once(Zend/Uri/Http.php): failed to open stream: No such file or directory

My code:

$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($username, $password, $service);
$docs = new Zend_Gdata_Docs($client);
$feed = $docs->getDocumentListFeed();
$this->render('index', array('feed', $feed));

My log:

2011/12/10 21:19:13 [error] [php] include_once(Zend/Uri/Http.php): failed to open stream: No such file or directory (/var/www/
Stack trace:
#0 /var/www/ loadClass()
#1 /var/www/ factory()
#2 /var/www/ Zend_Gdata_HttpClient->setUri()
#3 /var/www/ getHttpClient()
#4 /var/www/ DefaultController->actionIndex()
#5 /var/www/ CInlineAction->runWithParams()
#6 /var/www/ DefaultController->runAction()
#7 /var/www/ DefaultController->runActionWithFilters()
#8 /var/www/ DefaultController->run()
#9 /var/www/ CWebApplication->runController()
#10 /var/www/ CWebApplication->processRequest()
#11 /var/www/ CWebApplication->run()

Can anyone help me?


Comments from yiiframework:

@ shark: is your Zend library under protected/vendors/Zend and is Uri/Http.php under there? Make sure you put all files in the right directories.

@CeBe: Yes, they are.


So how do you initialize Zend autoloader? Post your code please.

// change the following paths if necessary

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

$app = Yii::createWebApplication($config);

Yii::import("ext.zendAutoloader.EZendAutoloader", true);

// you can load not only Zend classes but also other classes with the same naming
// convention
EZendAutoloader::$prefixes = array('Zend');

Yii::registerAutoloader(array("EZendAutoloader", "loadClass"));


In order to use this loader one should remove all require_once from Zend files.


Alternatively you could add Yii::import('application.vendors.*'); to add that path to php include path and require_once('Zend/foo/bar.php') can find the files.

@samdark samdark closed this

works for me, but slowly. :(


Well, you can do as stated in readme: strip all require_once and then try w/o import.


I removed all instances of require_once yet.


I had same error , I was calling xmlrpc class of zend and it was stuck on this error ..
if you could help so i could gather that data bcos due to that I need to use zend framework for web services consumption


Hm... guess this problem has been sovled, so what exactly is your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.