0

I am trying to use the Zend Gdata framework with wordpress but I am having some issues. Now everything works perfectly fine when I test on localhost with XAMPP. However on my web server my code breaks down.

Here is my code to include the framework.

`set_include_path(TEMPLATEPATH . '/includes/');
require_once ('Zend/Loader.php'); 
Zend_Loader::loadClass('Zend_Gdata_Youtube');`

That code produces the following error.

Warning: Zend_Loader::include_once(Zend/Gdata/Youtube.php) [zend-loader.include-once]: failed to open stream: No such file or directory in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146

Warning: Zend_Loader::include_once() [function.include]: Failed opening 'Zend/Gdata/Youtube.php' for inclusion (include_path='/home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/') in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146

Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Gdata/Youtube.php" does not exist or class "Zend_Gdata_Youtube" was not found in the file' in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php:99 Stack trace: #0 /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/modules/yt_link_checker.php(19): Zend_Loader::loadClass('Zend_Gdata_Yout...') #1 /home/damain/public_html/mysite.com/wp-includes/plugin.php(405): load_zend_gdata('') #2 /home/damain/public_html/mysite.com/wp-admin/admin.php(111): do_action('load_zend_gdata', Array) #3 /home/damain/public_html/mysite.com/wp-admin/index.php(10): require_once('/home/damain/...') #4 {main} thrown in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 99

I cannot seem to figure this issue out. Can anyone help?

3 Answers 3

1

The best solution in this case is to run the script requiring the Zend Loader and use var_dump(get_include_path()) to see what the server says the path is. Then keep modifying the php.ini include_path until the script finds it.

In your case, I'm not sure if 'damain' is supposed to be 'domain'. My include path which finally worked was:

/home2/thelove6/public_html/zf/ZendGdata/library" thelove6 being the username.

0

Did you look to see if those files exist in those directories? (/mysite/includes/Zend/Loader.php) and they have the correct permissions? It sounds like that could very well be the issue. The other thing to check with a simple phpinfo() would be that you have all of the libraries install on the live server.

2
  • Yes I did the directories and files are there. However I never did anything with permissions. What permissions are those files supposed to have?
    – Bill
    Commented Oct 31, 2011 at 4:04
  • I am not exactly sure but they should be executable by the system. I would try 777 to see if that is the issue, if not go back the the perms it was originally set at. Commented Oct 31, 2011 at 4:20
0

Ok, the possible reason is: You're not using the proper case for the classname. For the version 1.11.11, it will be Zend_Gdata_YouTube rather than Zend_Gdata_Youtube.

Windows OS is ignoring the case, whereas the Linux server does not. Hope this will solve your problem, just look at the proper case of the Class or filenames.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.