Google Groups Home
Help | Sign in
Zend Gdata problem... proxy authentication
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
nuwanbando  
View profile
 More options Sep 7 2007, 3:15 am
From: nuwanbando <bandara.nu...@gmail.com>
Date: Fri, 07 Sep 2007 07:15:00 -0000
Subject: Zend Gdata problem... proxy authentication
Am working behind a proxy and when i tried to make a HTTP secure
connection i get the following error

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Unable to Connect to www.google.com:80. Error #111:
Connection refused' in /nfs/www/sensoria/docs/components/
com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php:409
Stack trace: #0 /nfs/www/sensoria/docs/components/com_eventmanager/
gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php(606): Zend_Gdata_App-

>post('<atom:entry xml...', 'http://www.goog...') #1 /nfs/www/sensoria/

docs/components/com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/
Gdata/Calendar.php(152): Zend_Gdata_App-
>insertEntry(Object(Zend_Gdata_Calendar_EventEntry), 'http://

www.goog...', 'Zend_Gdata_Cale...') #2 /nfs/www/sensoria/docs/
components/com_eventmanager/eventmanager.php(34): Zend_Gdata_Calendar-
>insertEvent(Object(Zend_Gdata_Calendar_EventEntry)) #3 /nfs/www/

sensoria/docs/components/com_eventmanager/eventmanager.php(310):
createEvent(NULL, 'test', 'test123', 'fast', '2006-12-01',
'2006-12-08', '03:00', '-08') #4 /nfs/www/sensoria/docs/
index.php(183): require_onc in /nfs/www/sensoria/docs/components/
com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php on
line 409

the code i used to connect is..

set_include_path('components/com_eventmanager/gdata/ZendGdata-1.0.0/
library');
                require_once 'Zend/Loader.php';
                Zend_Loader::loadClass('Zend_Gdata');
                Zend_Loader::loadClass('Zend_Gdata_AuthSub');
                Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
                Zend_Loader::loadClass('Zend_Gdata_Calendar');
                Zend_Loader::loadClass('Zend_Http_Client');

                $user = 'x...@gmail.com';
                $pass = 'xxxxxxx';

                $client = new Zend_Http_Client('https://www.google.com/', array(
               'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
               'proxy_host'   => 'my.proxy.de',
               'proxy_port'   => 8080,
              ));

                $authenticatedClient = Zend_Gdata_ClientLogin::getHttpClient($user,
$pass, Zend_Gdata_Calendar::AUTH_SERVICE_NAME, $client, 'project-
test-1.0');


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Boyd (Google)  
View profile
 More options Sep 7 2007, 8:35 pm
From: "Ryan Boyd (Google)" <api.rb...@google.com>
Date: Sat, 08 Sep 2007 00:35:19 -0000
Local: Fri, Sep 7 2007 8:35 pm
Subject: Re: Zend Gdata problem... proxy authentication
Hi,

I investigated this and found a problem in the ClientLogin class.  It
appears that the ClientLogin class is creating a new instance of the
Zend_Http_Client after authenticating and before returning it.

The easiest way to avoid this, based on your code above, would be to:

$httpConfig = array(
               'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
               'proxy_host'   => 'my.proxy.de',
               'proxy_port'   => 8080,
              );

// create the client with the appropriate config
// this client is used to perform the ClientLogin request to
https://www.google.com/accounts/ClientLogin
$client = new Zend_Http_Client('https://www.google.com/',
$httpConfig);
$authenticatedClient = Zend_Gdata_ClientLogin::getHttpClient($user,
$pass, Zend_Gdata_Calendar::AUTH_SERVICE_NAME, $client, 'project-
test-1.0');

// set the proxy config on the client created by the ClientLogin, so
all future
// requests with the client will use the proxy
$authenticatedClient->setConfig($httpConfig);

I've filed this issue in the ZF issue tracker:
http://framework.zend.com/issues/browse/ZF-1920

Let me know how things work out on your end.

Thanks,
-Ryan

On Sep 7, 12:15 am, nuwanbando <bandara.nu...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nuwanbando  
View profile
 More options Sep 10 2007, 4:50 am
From: nuwanbando <bandara.nu...@gmail.com>
Date: Mon, 10 Sep 2007 08:50:00 -0000
Subject: Re: Zend Gdata problem... proxy authentication
Hello Ryan

Thanks for your reply..but the problem did not solve... at one point
there is no method as setConfig in $authenticatedClient object.. I
think it should be
                                      $client->setConfig($httpConfig);
correct me if i am wrong.. when i used ur code like :
$authenticatedClient->setConfig($httpConfig);
I get the error :

Fatal error: Call to a member function setConfig() on a non-object in /
nfs/www/sensoria/docs/components/com_eventmanager/eventmanager.php on
line 289

but when i turn it to : $client->setConfig($httpConfig);
               I get teh same old error saying

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Unable to Connect to www.google.com:80. Error #111:
Connection refused' in /nfs/www/sensoria/docs/components/
com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php:409
Stack trace: #0 /nfs/www/sensoria/docs/components/com_eventmanager/
gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php(606): Zend_Gdata_App-

>post('<atom:entry xml...', 'http://www.goog...') #1 /nfs/www/sensoria/

docs/components/com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/
Gdata/Calendar.php(152): Zend_Gdata_App-
>insertEntry(Object(Zend_Gdata_Calendar_EventEntry), 'http://

www.goog...', 'Zend_Gdata_Cale...') #2 /nfs/www/sensoria/docs/
components/com_eventmanager/eventmanager.php(34): Zend_Gdata_Calendar-
>insertEvent(Object(Zend_Gdata_Calendar_EventEntry)) #3 /nfs/www/

sensoria/docs/components/com_eventmanager/eventmanager.php(306):
createEvent(NULL, 'test', 'testing google', 'fast', '2007-09-10',
'2007-09-12', '03:00', '-08') #4 /nfs/www/sensoria/docs/
index.php(183): requ in /nfs/www/sensoria/docs/components/
com_eventmanager/gdata/ZendGdata-1.0.0/library/Zend/Gdata/App.php on
line 409

----------------------------hope for a quick
help------------------------------- thanks
regards
nuwan

On Sep 8, 2:35 am, "Ryan Boyd (Google)" <api.rb...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google