I'm trying to include the Zend Gdata module into a plugin, but this error appears on plugin activation:

include_once(Zend\Gdata\YouTube.php) [function.include-once]: failed to open stream: No such file or directory in \Zend\Loader.php on line 146

any help appreciated, thanks

I have the main plugin file in the root and then a Zend subfolder which contains the module. This was just copied from the demo app which works fine on the same XAMPP installation, so it's something to do with how WordPress includes files?

* @see Zend_Loader
require_once 'Zend/Loader.php';

* @see Zend_Gdata_YouTube
  • 1
    Needs more info. So far it simply looks like you used the wrong path.
    – kaiser
    Jan 8, 2012 at 16:52

1 Answer 1


* UPDATE * Please see at the bottom for right solution!!!

One way to solve this problem is that you use ini_set to set the path to your Zend folder.

I have the Zend folder in my current theme folder so i only need to tell path var what the path to my theme folder is. This code goes to functions.php if its in the theme you want to use it of course :)

ini_set ( 'include_path', ini_get ( 'include_path' ) . ':../:' . dirname ( __FILE__ ) . ':' );

require_once 'Zend/Loader.php';

Zend_Loader::loadClass ( 'Zend_Gdata_YouTube' );
Zend_Loader::loadClass ( 'Zend_Gdata_AuthSub' );
Zend_Loader::loadClass ( 'Zend_Gdata_ClientLogin' );

I will also share a screenshot just in case the structure is confusing anyone: As you see i have lifted Zend folder out from the ZendGdata-1.11.11 folder

enter image description here

Hope this helps :)


Apparently i messed up a bit, the Zend folder im my case is actually in the ROOT. That mean if i enter www.mysite.com/Zend i should be able to access php files there. So, simplifying that all, Zend/ folder should not be in:


But it should be in


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.