We are running on CentOS 5.5, PHP 5.2.16, and ZendFramework 1.11.9.
Here's the code PHP segment:
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
# Authentication Token
$user = '[email protected]';
$pass = 'Sleep4Server';
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service
name for calendar
$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,$service);
### Add event to non-default, selceted calendar
//Set up that loop again to find the new calendar:
$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();
foreach ($calFeed as $calendar) {
if($calendar->title->text == $calendar_name)
$appCalUrl = $calendar->content->src;
}
#$event = array ('description' => $description, 'start' =>
'2011-07-21T16:46:11.000Z', 'end' => '2011-07-21T17:46:11.000Z');
$start_date_time = $start_date . "T" . $start_time . "-04:00";
$end_date_time = $end_date . "T" . $end_time . "-04:00";
$event = array ('description' => $description, 'start' =>
$start_date_time, 'end' => $end_date_time);
$title = $event['description'];
//Quick heads up
//This is a handy way of getting the date/time in one expression.
$eventStart = date('Y-m-d\TH:i:sP', strtotime($event['start']));
$eventEnd = date('Y-m-d\TH:i:sP', strtotime($event['end']));
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
# Authentication Token
$user = '[email protected]';
$pass = 'PASSWORD';
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service
name for calendar
$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,$service);
### Add event to non-default, selceted calendar
//Set up that loop again to find the new calendar:
$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();
foreach ($calFeed as $calendar) {
if($calendar->title->text == $calendar_name)
$appCalUrl = $calendar->content->src;
}
$start_date_time = $start_date . "T" . $start_time . "-04:00";
$end_date_time = $end_date . "T" . $end_time . "-04:00";
$event = array ('description' => $description, 'start' =>
$start_date_time, 'end' => $end_date_time);
$title = $event['description'];
//Quick heads up
//This is a handy way of getting the date/time in one expression.
$eventStart = date('Y-m-d\TH:i:sP', strtotime($event['start']));
$eventEnd = date('Y-m-d\TH:i:sP', strtotime($event['end']));
* $newEvent = $gdataCal->newEventEntry();*
*I get the following error from the line in red:*
An error occurred in 2 on line
include_once(Zend/Gdata/Calendar/Extension/EventEntry.php) [
function.include-once <http://testscgp.indigoarc.com/function.include-once>]:
failed to open stream: No such file or directory:
/var/www/ZendFramework-1.11.9/library/Zend/Loader.php.An error occurred in 2
on line include_once()
[function.include<http://testscgp.indigoarc.com/function.include>]:
Failed opening 'Zend/Gdata/Calendar/Extension/EventEntry.php' for inclusion
(include_path='.:/php/includes:/var/www/ZendFramework/library:/var/www/jquery'):
/var/www/ZendFramework-1.11.9/library/Zend/Loader.php.
*The include_path from php.ini is as follows:*
include_path =
".:/php/includes:/var/www/ZendFramework-1.11.9/library:/var/www/jquery"
The funny thing is that the calendar entry is applied to the calendar as
expected. Rookie question - but why is the EventEntry.php class under
Zend/Gdata/Calendar/ in the 1.11.9 distribution, but the Loader is looking
for it under Zend/Gdata/Calendar/Extension?
Thanks.
Steve
--
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" 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://code.google.com/apis/calendar/community/forum.html