rossh Posted May 7, 2008 Share Posted May 7, 2008 Hi i've been looking into the Google Calendar API had how i can add events via PHP. I downloaded the Zend Framework and installed it. Seems to working fine, but i can't get the sample Google Calendar scripts to work. When i run the code below, i get an error (also below). Reading online it looks like it's something to do with OpenSSL and Windows. I've followed various setting adding .dll files to windows\system32 and the environment variable PATH, but it's still not working. If anyone has any suggestions i'd really appreciate it. Ross <?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 } ?> ERROR: 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', '07/05/2008', '09:00', '07/05/2008', '09:15', '0') #5 {main} thrown in C:\xampp\php\library\Zend\Gdata\App.php on line 468 Link to comment https://forums.phpfreaks.com/topic/104613-google-calendar-api-problems-win-xp-xampp/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.