Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-10-2008, 08:32 AM
Junior Member
 
Join Date: May 2008
Posts: 1
Default XAMPP for windows and Google Calendar API

Hi I'm having trouble adding an event to Google calendar. I get the following exception:


Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400' in C:\xampp\php\library\Zend\Gdata\App.php:468 Stack trace: #0 C:\xampp\php\library\Zend\Gdata\App.php(459): Zend_Gdata_App->post(Object(Zend_Gdata_Calendar_EventEntry), 'http://www.goog...', 4, 'application/ato...', Array) #1 C:\xampp\php\library\Zend\Gdata\App.php(663): Zend_Gdata_App->post(Object(Zend_Gdata_Calendar_EventEntry), 'http://www.goog...') #2 C:\xampp\php\library\Zend\Gdata\Calendar.php(156): Zend_Gdata_App->insertEntry(Object(Zend_Gdata_Calendar_EventEntry ), 'http://www.goog...', 'Zend_Gdata_Cale...') #3 C:\xampp\htdocs\dev\cal\calendar.php(384): Zend_Gdata_Calendar->insertEvent(Object(Zend_Gdata_Calendar_EventEntry )) #4 C:\xampp\htdocs\dev\cal\index.php(11): createEvent(Object(Zend_Http_Client), 'ACC--Test', 'Test', 'Test', '10/05/2008', '09:00', '10/05/2008', '09:15', '0') #5 {main} thrown in C:\xampp\php\library\Zend\Gdata\App.php on line 468

Code:

<?php
include("calendar.php");
$user = '****@googlemail.com';
$pass = '****';
$tzOffset = '0';

if(isset($_POST['submit'])){
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass, $service);
createEvent($client, "ACC--".$_POST['title'], $_POST['desc'], $_POST['project'], $_POST['date'], "09:00", $_POST['date'], "09:15", $tzOffset);
}else{
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Title: <br>
<input type="text" name="title"><br>
Description: <br>
<textarea rows="5" cols="80" name="desc"></textarea><br>
Project: <br>
<input type="text" name="project"><br>
Date of Accomplishment:<br>
<input type="text" name="date"><br>
<input type="submit" name="submit" value="submit">
</form>
<?php
}
?>

I've been reading about Windows Xampp and OpenSSL. Tried to configure all the settings people suggest online, but it's still not working.

If i run the calendar.php file from the demos i do get a list of calendars, but refreshing gives me another exception.

Any help would be appreciated.

Ross
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:32 AM.