11 messages in com.googlegroups.google-calendar-help-dataapiRe: GData Zend Framework authenticati...
FromSent OnAttachments
Erik08 Jun 2007 07:54 
Lane LiaBraaten (Google)08 Jun 2007 10:19 
Erik08 Jun 2007 11:00 
wen...@gmail.com13 Jun 2007 12:40 
CrazyAtlantaGuy13 Jun 2007 17:32 
Ryan Boyd (Google)13 Jun 2007 23:08 
wen...@gmail.com14 Jun 2007 05:19 
CrazyAtlantaGuy14 Jun 2007 06:12 
CrazyAtlantaGuy14 Jun 2007 06:24 
CrazyAtlantaGuy14 Jun 2007 19:00 
Ryan Boyd (Google)15 Jun 2007 04:13 
Subject:Re: GData Zend Framework authentication problem
From:wen...@gmail.com (wen@gmail.com)
Date:06/14/2007 05:19:52 AM
List:com.googlegroups.google-calendar-help-dataapi

My ultimate goal is quite simple, all I really want to do is read my event data so I can generate an RSS feed that can be fed into tumblr.

I called godaddy, just on the off chance they'd be able to tell me problems I'd encounter, and got a lot of "We don't help with coding" and then when I just asked to make sure if it was even possible on their shared hosting they told me it was, but that it'd be difficult.

Anyway using the help from this thread, along with the manual I crafted:

$config = array( 'adapter' => 'Zend_Http_Client_Adapter_Proxy', 'proxy_host' => 'proxy.shr.secureserver.net', 'proxy_port' => 3128 ); // Instantiate a client object $clientp = new Zend_Http_Client($myCalendar, $config); $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, 'cl', $clientp); $service = new Zend_Gdata_Calendar($client);

try { $listFeed= $service->getCalendarListFeed(); } catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e->getResponse(); }

I get the Error every time, and I did some other testing and the $client variable is null. I also am not setting $myCalendar because I wasn't entirely clear and what that should be. I tried putting names of my calendars in there, which those caused invalid schema errors, I also tried the addresses of my feeds, which didn't throw errors, but didn't improve the situation.

I also tried getting events instead of calendars with the same results. At this point I'm not sure if it's an error with goDaddy, or just my not understanding how to use the API. On Jun 14, 1:08 am, "Ryan Boyd (Google)" <api.@google.com> wrote:

Hi CrazyAtlantaGuy,

That seems a bit odd that POST would not be allowed, as it's a common method of HTTP communication-- used in many web sites for form data and also used by lots of different APIs.

What operations were you performing at the time you received the timeout errors? Was it adding new entries, or updating/deleting entries? If the latter, the PUT/DELETE methods are used by default. These methods are less common and much more likely to be blocked by a proxy server. Fortunately, there is an option in Zend_Gdata_Calendar (via way of Zend_Gdata_App) to indicate that you want POST requests to be used in place of PUTs/DELETEs. This is set by calling $calendarService->setHttpMethodOverride(true); Setting this property tells the library to sent HTTP POSTS but add a 'X-Http-Method- Override' header indicating that PUT or DELETE was the intentioned method.

If it really is POST being disallowed, then the only other major remaining methods are GET and HEAD. It is highly unlikely that any insert/update/delete operations will ever work with Google data APIs using these HTTP verbs as GET and HEAD requests should not have any side-effects based upon the HTTP spec.

Also, for future debugging-- any HTTP errors should throw an instance of Zend_Gdata_App_HttpException. This provides a method called getResponse() which returns the Zend_Http_Response object. Just var_dump this and you should have any information you want about the server error.

Good luck in getting this resolved!

Cheers, -Ryan

On Jun 13, 5:32 pm, CrazyAtlantaGuy <craz@gmail.com> wrote:

I've been working on this recently too and have run into the same troubles. I was able to avoid the timeout error by using the proxy - however now that I can connect to the proxy the communications with google still fails. Adding lots of print lines to the Zend code I have found that the proxy is sending back an HTTP error message,"501 Not Implemented." After several emails with GoDaddy support I've been told "it appears that our hosting does not support the 'POST' option when using our proxy service". The Google's PHP code does all of it's communications by POSTs, which means that as things stand it using the Zend Framework as-is to communicate with Google just won't work.

It would be really nice if GoDaddy realized having the proxy caused their customers a real headache and just got ride of it. The only other solutions, so I see it, is to rewrite parts of the Google PHP so that it no longer sends and retrieves using POSTs. Well, there's always the option of finding another host, which may be the easier of the two.

Any other ideas or solutions would be most appreciated.

On Jun 13, 3:41 pm, "wen@gmail.com" <wen@gmail.com> wrote:

I'm trying to do something similar, and the code you provided got me to stop having the connection error, however when I use the code similar to yours above, only putting in my user and pass, I end up getting a null client returned.

I'm also unsure what the $myCalendar variable should be set to.... or if I need to call some other kind of function before I can do this.

On Jun 8, 1:00 pm, Erik <erik@gmail.com> wrote:

Hi, this is not helping. However, In theGodaddyhelp I found out thatGodaddyuses
a proxy for the google checkout application. So I tried to use this proxy settings and it seems to be working. This is what I used:

$config = array( 'adapter' => 'Zend_Http_Client_Adapter_Proxy', 'proxy_host' => 'proxy.shr.secureserver.net', 'proxy_port' => 3128 ); // Instantiate a client object $clientp = new Zend_Http_Client($myCalendar, $config); $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, 'cl', $clientp);

On 8 jun, 19:19, "Lane LiaBraaten (Google)" <api.@gmail.com> wrote:

Hi Erik,

cederstrom posted this link in another
thread:http://www.nabble.com/SSLv2-error-when-using-Gdata-API-t2960985s16154...

Let us know if that solves your problem, Lane

On Jun 8, 7:54 am, Erik <erik@gmail.com> wrote:

When I try to authenticate I get the following error:

Fatal error: Uncaught exception 'Zend_Gdata_HttpException' with message 'Unable to Connect to sslv2://www.google.com:443. Error #110: Connection timed out' in /home/content/d/i/s/dispuutjupiter/html/Zend/ Gdata/AuthSub.php:106 Stack trace: #0

My site is hosted atgodaddyand I'm running PHP Version 5.1.4. To me it seems that the problem is located in the ClientLogin.php file.

Can anyone help me to get this working?