Question

A core php website is integrated with google calendar API. A web form data collected and to be updated to google calendar. Inspite of having all the date format using DATE_ATOM,mktime() I am facing this issue.

How to fix Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException'?

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400 [Line 1, Column 659, element gd:when] Badly formatted datetime' in /home/website/public_html/zend/lib/Zend/Gdata/App.php:700 Stack trace:#0 /home/website/public_html/zend/lib/Zend/Gdata.php(219): Zend_Gdata_App->performHttpRequest('POST', 'http://www.goog...', Array, 'performHttpRequest('POST', 'http://www.goog...', Array, 'post(Object(Zend_Gdata_Calendar_EventEntry), 'http://www.goog...', NULL, NULL, Array) #3 /home/website/public_html/zend/lib/Zend/Gdata/Calendar.php(165): Zend_Gdata_App->insertEntry(Object(Zend_Gdata_Calendar_EventEntry), 'http://www.goog...', 'Zend_Gdata_Cale...') #4 /home/website/public_html/add-session.php(297): Zend_Gdata_Calendar->insertEvent(Object(Zend_Gdata_C in /home/website/public_html/zend/lib/Zend/Gdata/App.php on line 700

NONE OF THE BELOW LINKS HELPED ME Uncaught exception 'Zend_Gdata_App_HttpException YouTube PHP API - Zend_Gdata_App_HttpException Fatal error: Uncaught exception 'RuntimeException' Fatal error: Uncaught exception 'Exception' in PHPExcel classes

https://groups.google.com/forum/?fromgroups=#!topic/google-contacts-api/IFHANnTWzIM

Was it helpful?

Solution

If you have any html entities or space, start time or end time then you will end up with this issue. Make sure that there are no html entities or space in the below line of codes.

$start = date(DATE_ATOM, mktime($_POST['sdate_hh'], $_POST['sdate_ii'], 0, $_POST['sdate_mm'], $_POST['sdate_dd'], $_POST['sdate_yy']));

$end = date(DATE_ATOM, mktime($_POST['edate_hh'], $_POST['edate_ii'], 0, $_POST['edate_mm'], $_POST['edate_dd'], $_POST['edate_yy']));

Hence the issue is solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top