Hi, I have an aplication running with calendar API written in php. It
was working OK until two days ago or so... It started throwing random
errors, with random commands... I dind't know what to do. Now, It now
throws the same error after Login-in with authSub:

exception 'Zend_Gdata_App_HttpException' with message 'Expected
response code 200, got 500' in /var/www/vhosts/udalaitz.com/httpsdocs/
admin/include/Zend/Gdata/App.php:286 Stack trace: #0 /var/www/vhosts/
udalaitz.com/httpsdocs/admin/include/Zend/Gdata/App.php(144):
Zend_Gdata_App::import('http://www.goog...', Object(Zend_Http_Client),
'Zend_Gdata_Cale...') #1 /var/www/vhosts/udalaitz.com/httpsdocs/admin/
include/Zend/Gdata.php(131): Zend_Gdata_App->getEntry('http://
www.goog...', 'Zend_Gdata_Cale...') #2 /var/www/vhosts/udalaitz.com/
httpsdocs/admin/include/Zend/Gdata/Calendar.php(148): Zend_Gdata-
>getEntry('http://www.goog...', 'Zend_Gdata_Cale...') #3 /var/www/
vhosts/udalaitz.com/httpsdocs/admin/include/funciones_admin.php(19):
Zend_Gdata_Calendar->getCalendarListEntry('http://www.goog...') #4 /
var/www/vhosts/udalaitz.com/httpsdocs/admin/index.php(20): LogIn() #5
{main}

This is the function I wrote for LogIn():
function LogIn(){
        global $mysql, $conn, $db;

                try{
                        $gCal = GoogleAuthSub();
                }catch (Zend_Gdata_App_Exception $e){
                        return $e;
                }
                if ($gCal){
                        $conn = mysql_connect($mysql['servidor'], 
$mysql['usuario'], $mysql
['clave']);
                        $db = mysql_select_db($mysql['db']);
                        try{
                        $calendario = 
$gCal->getCalendarListEntry('http://www.google.com/
calendar/feeds/default/');
                        }catch (Zend_Gdata_App_Exception $e){
                                return $e;
                        }
                }else{
                        return "Error al validar token.</br>
                        <a href=\"index.php\">Intentelo de nuevo</a>";
                }
}

the function GoogleAuthSub() I wrote is like this:
function GoogleAuthSub(){
if(!isset($_SESSION['sessionToken'])) {
        if (!isset($_GET['token'])){
          $next = getCurrentUrl();
          $scope = 'http://www.google.com/calendar/feeds/';
          $secure = false;
          $session = true;
          $url = Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope,
$secure, $session);
                header("Location: ".$url."&hd=udalaitz.com");
                return false;
        }else{
                try{
                        $_SESSION['sessionToken'] =
Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
                }catch (Zend_Gdata_App_Exception $e){
                        return false;
                }
        }
}
try {
$client = Zend_Gdata_AuthSub::getHttpClient($_SESSION
['sessionToken']);
}catch (Zend_Gdata_App_Exception $e){
                        return false;
}
$gdataCal = new Zend_Gdata_Calendar($client);
return $gdataCal;
}

--~--~---------~--~----~------------~-------~--~----~
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://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to