ZF-7013: Gdata - paths in loader apparently incorrect and causing errors
Description
I have an action that posts data to a blogger account. The actual action works fine, but with zend framework versions 1.8.2 and 1.8.3 I have an error message announcing that there are files missing for Zend_Loader.
Here are the files it is looking for:
Zend/Gdata/Kind/Entry.php Zend/Gdata/Kind/Title.php Zend/Gdata/Kind/Content.php
Oddly, the problem does not affect Zend 1.8.1 (and presumably below) only versions 1.8.2/3. Also, the actual action works great (data is posted to the blog etc...), it is almost as if there is an error for no reason.
Just top confirm, the library/Zend directory(s) and files are completely un-modified, so the installation is stock.
Any help would be appreciated.
Comments
Posted by Ryan Boyd (rboyd) on 2009-06-15T13:45:25.000+0000
Trevor - can you look at this?
Posted by Trevor Johns (tjohns) on 2009-06-22T14:45:15.000+0000
Matthew, Can you provide some more information? What are you calling that's causing this, and what is the exact error text that's returned?
Posted by Matthew Roby (testerman) on 2009-07-01T15:02:42.000+0000
Hi there,
No problem, I am using Zend_Gdata, the particular call(s) are:
newEntry() setCategory() newContent() insertEntry()
Here is the output from the browser (this is with Zend 1.8.4):
Warning: Zend_Loader::include(Zend/Gdata/Kind/Entry.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Kind/Entry.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Kind/Entry.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Entry.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Entry.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Extension/Entry.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Kind/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Kind/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Kind/Title.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Extension/Title.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Title.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Title.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Kind/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Kind/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Kind/Content.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Extension/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Extension/Content.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(Zend/Gdata/Content.php): failed to open stream: No such file or directory in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 Warning: Zend_Loader::include(): Failed opening 'Zend/Gdata/Content.php' for inclusion (include_path='/hsphere/local/home/mattroby/dev.workjabber.com.application/../library:/hsphere/local/home/mattroby/library:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/mattroby/library/Zend/Loader.php on line 83 This is the editing URL - http://blogger.com/feeds/1244349801983750320/…
Posted by Matthew Roby (testerman) on 2009-07-01T15:07:31.000+0000
Just an update, with the latest 1.8.4 release of ZF, the problem still persists.
Posted by Trevor Johns (tjohns) on 2009-07-02T12:03:07.000+0000
Matthew, I think this may be a problem with your installation. I'm not able to reproduce this.
I've attached a test case here that calls all of the functions you listed without problem: [^zf7013-test.php]
For now, I'm going to close this issue with resolution "cannot reproduce". However, if you can provide a modified test case which demonstrates this problem, feel free to leave a followup comment and I'll re-open this.
Posted by Chua Chee How (cheeze) on 2009-07-08T18:12:31.000+0000
Trevor,
As requested, I am posting here because of a similar problem. The code is as follows:
I'm trying to use the Gapps API and access the Provisioning API of Google Apps. The Provisioning API is available on Premier and Education editions of Google Apps.
The warning message is displayed below. I'm using version 1.8.4 of the framework. Previously when I was in version 1.7.8, this message did not appear. I switched the Gdata library folder from 1.7.8 into 1.8.4 and the warning message did not appear as well.
Warning: include(Zend/Gdata/Gapps/Extension/UserQuery.php) [function.include]: failed to open stream: No such file or directory in /home/cheeze/public_html/zend/library/Zend/Loader.php on line 83
Warning: include() [function.include]: Failed opening 'Zend/Gdata/Gapps/Extension/UserQuery.php' for inclusion (include_path='/home/cheeze/public_html/zend/application/../library:/home/cheeze/public_html/zend/library:.:/usr/share/php:/usr/share/pear') in /home/cheeze/public_html/zend/library/Zend/Loader.php on line 83
Posted by Kevin Horn (kevinhorn) on 2009-07-16T15:16:24.000+0000
I am having essentially the exact same issue as Chee How
trying to access the Google Provisioning API, using virtually identical code, and am getting the same error:
Warning: include(Zend/Gdata/Gapps/Extension/UserQuery.php) [function.include]: failed to open stream: No such file or directory in /home/cheeze/public_html/zend/library/Zend/Loader.php on line 83
Warning: include() [function.include]: Failed opening 'Zend/Gdata/Gapps/Extension/UserQuery.php' for inclusion (include_path='/home/cheeze/public_html/zend/application/../library:/home/cheeze/public_html/zend/library:.:/usr/share/php:/usr/share/pear') in /home/cheeze/public_html/zend/library/Zend/Loader.php on line 83
As a temporary workaround, I've copied the UserQuery.php file into the Extensions directory, which seems to work, but I can't understand why the loader is looking there to begin with.
Posted by Kevin Horn (kevinhorn) on 2009-07-16T15:51:13.000+0000
Experimenting further, it seems that, at least in my case, UserQuery is actually being found (I can use retrieveUser function perfectly), but the warnings still persist.
Could the Loader be looking for the file in two different places?
Posted by Trevor Johns (tjohns) on 2009-07-20T14:04:57.000+0000
For those of you who are experiencing this problem:
Please attach a complete test case that reproduces this, including calls to Zend_Loader. See this file as an example: [^zf7013-test.php]
Also please let me know when output you run the above test case, and the the output from {{phpinfo()}} (or {{php -i}} from the command line).
Posted by Leif H (leifern) on 2009-07-21T15:50:08.000+0000
Got a similar error, but using the autoloader.
###3
<?php require_once 'Zend/Loader/Autoloader.php'; $loader = Zend_Loader_Autoloader::getInstance(); $email = 'email@somedomain.com'; $pass = 'password'; $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; try { $client = Zend_Gdata_ClientLogin::getHttpClient($email, $pass, $service); } catch (Zend_Gdata_App_Exception $e) { echo "Error: Authentication with Google failed. Reason: BadAuthentication"; exit; } $gdataCal = new Zend_Gdata_Calendar($client); $query = $gdataCal->newEventQuery(); ?>#
The output
Warning: include(Zend/Gdata/Calendar/Extension/EventQuery.php) [function.include]: failed to open stream: No such file or directory in /usr/share/php/ZendFramework-1.8.4/library/Zend/Loader.php on line 83
Warning: include() [function.include]: Failed opening 'Zend/Gdata/Calendar/Extension/EventQuery.php' for inclusion (include_path='.:/var/www/developer/libs:/usr/share/pear') in /usr/share/php/ZendFramework-1.8.4/library/Zend/Loader.php on line 83
#
I don't get the error when using
require_once('Zend/Loader.php'); Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar');
to load.
If interested, i can give you the output of my php -i
Posted by Chua Chee How (cheeze) on 2009-07-21T18:40:59.000+0000
I'm having the same issue with Leif: using the loader "manually" works fine.
The problem occurs when using the Autoloader.
Posted by Trevor Johns (tjohns) on 2009-07-21T21:37:07.000+0000
It looks like this problem occurs in the release-1.8 branch, but not in trunk.
Since the 1.9 branch is going to be cut soon, I'm not going to bother to backport the fix for this to the release-1.8 branch (unless I hear that there's going to be another 1.8.X release). In the meantime, please download a development snapshot from here to fix this:
http://framework.zend.com/code/browse/…
If you continue to have this problem while using the above snapshot, please let me know.
Posted by Trevor Johns (tjohns) on 2009-07-21T21:42:09.000+0000
Resolving as fixed for next minor release (1.9.0).
Posted by Kevin Horn (kevinhorn) on 2009-07-21T22:05:15.000+0000
Just chiming in...
Verified that my issue was the same...Loader works fine, Autoloader causes issue
Will try snapshot tomorrow.
Thanks, Trevor!
Posted by Kevin Horn (kevinhorn) on 2009-07-22T13:01:57.000+0000
Verified that the dev snapshot listed above solve my issue.
Thanks!
Posted by Chua Chee How (cheeze) on 2009-07-26T09:02:59.000+0000
I can also verify that the 1.9 version fixes the issue as well.
Thanks for the work, Trevor!
Posted by Maxim Postoronca (max4ever) on 2011-12-23T16:59:27.000+0000
using version 1.11.11 i get include_once() [function.include]: Failed opening 'Zend\Gdata\Calendar\Extension\EventQuery.php' for inclusion (include_path='C:\www\www\gestionale\application/../library;C:\www\www\gestionale\library;.;C:\php\pear') in C:\www\www\gestionale\library\Zend\Loader.php : 146
Posted by Jurgens du Toit (jrgns) on 2012-06-03T12:56:13.000+0000
Another bug report has been filed for this as ZF-11959 .