Hello All,
We have a series of pages in various directories that each need to
call a script that will retrieve calendar events using the Zend
standalone library and print them out.
Here is what we have currently:
--File 1 at /root/path/athletics/mensBasketball.php:
<pre>
$eventCategory = "Mens Basketball";
include '/root/path/calendar/listCalendar.php';
</pre>
--File 2 at /root/path/calendar/listCalendar.php:
<pre>
require_once '/root/path/calendar/Zend/Gdata.php';
require_once '/root/path/calendar/Zend/Gdata/ClientLogin.php';
require_once '/root/path/calendar/Zend/Gdata/Calendar.php';
$startDate = date('Y-m-d');
$endDate = date('Y-m-d',mktime(0,0,0,date('m'),date('d'),(date('Y')
+1)));
$gdataCal = new Zend_Gdata_Calendar();
$query = $gdataCal->newEventQuery();
$query->setUser('[EMAIL PROTECTED]');
$query->setVisibility('private-magiccookiekey');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setStartMin($startDate);
$query->setStartMax($endDate);
$query->setMaxResults(100);
$query->setQuery($eventCategory);
$athleticsFeed = $gdataCal->getCalendarEventFeed($query);
foreach ($athleticsFeed as $event) {
foreach ($event->when as $when) {
[...print event details...]
}
}
</pre>
This results in:
<pre>
Fatal error: Uncaught exception 'Zend_Gdata_App_Exception' with
message 'Unable to find 'EventQuery' in registered packages' in /root/
path/calendar/Zend/Gdata/App.php:731 Stack trace: #0 [internal
function]: Zend_Gdata_App->__call('newEventQuery', Array) #1 /root/
path/calendar/listCalendar.php(44): Zend_Gdata_Calendar-
>newEventQuery() #2 /root/path/athletics/02_01_01_schedule.php(17):
include('/root/path/c...') #3 {main} thrown in /root/path/calendar/
Zend/Gdata/App.php on line 731
</pre>
At first I was having cascading problems with file includes. Since
the original calling script (e.g. /root/path/athletics/
mensBasketball.php) wasn't located in the same directory as the Zend
library, each include called within the library would throw an error.
I thought changing the include paths in the library files to absolute
paths would solve the problem. Although I did eliminate the "no such
file or directory" errors I was running into, I'm stuck with the
above. We can't simply set the include_path, because other files in
the site include things that aren't in the Zend library folder.
I'm sorry if I'm missing something painfully obvious, but I'm a
relative php noob. Any help greatly appreciated.
Thanks,
Aaron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---