February 15, 2010, 9:41am
i try to use the Zend XmlRPC Client so i did put the Libs in a folder called "Zend" in the vendors folder in my core yii installation. Then i used the following code as i found it many times on the web:
Still yii replys:
require_once(/Zend/XmlRpc/Client.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory
Any idea what i could have done wrong?
February 15, 2010, 11:45am
Okay, i did add an include path to the php.ini file
; UNIX: "/path1:/path2"
include_path = ".:/Applications/MAMP/bin/php5/lib/php:/Users/as/Sites/yii/framework/vendors/"
And now the Client.php is included by yii but it gives the following Error:
include(Zend_Uri_Http.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
But that file does exist exactly where it should.
Anyone any experience with this?
Any good ideas?
February 15, 2010, 12:47pm
Though i haven’t figured it out yet, it seems to be related to the autoloader.
require works but the Zend autoloader doesn’t.
#0 /Users/as/Sites/yii/framework/YiiBase.php(338): autoload()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /Users/as/Sites/yii/framework/vendors/Zend/Uri.php(125): class_exists()
#4 /Users/as/Sites/yii/framework/vendors/Zend/Http/Client.php(268): factory()
#5 /Users/as/Sites/yii/framework/vendors/Zend/XmlRpc/Client.php(266): Zend_Http_Client->setUri()
in Zend/Uri.php the Line 125 to 128 go:
Also the Zend Loader uses “include” instead of “require” though i can’t see where that should be the problem.
include should use the include path set in the php.ini as well right?
Anyone any ideas?
February 16, 2010, 12:27pm
Not sure if any help, but for the PHPExcel classes I used something like this:
...doing stuff with PHPExcel...
That way it could register the autoload from PHPExcel…