Closed cebe closed 12 years ago
Comments from yiiframework:
CeBe @ 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.
shark @CeBe: Yes, they are.
So how do you initialize Zend autoloader? Post your code please.
// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// 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);
require_once($yii);
$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"));
$app->run();
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.
Yii::import('application.vendors.*');
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?
comment by zang on yiiframework http://www.yiiframework.com/extension/zendautoloader/#c6081
When I want to use this extension, I got an error:
My code:
My log:
Can anyone help me?