Gmail三方OAuth访问 - Zend_Mail_Protocol_Exception [英] Gmail 3-legged OAuth access -- Zend_Mail_Protocol_Exception

查看:131
本文介绍了Gmail三方OAuth访问 - Zend_Mail_Protocol_Exception的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Google提供的三段式Oauth PHP代码('google-mail-xoauth-tools')访问Gmail: http://code.google.com/apis/gmail/oauth/code.html 。我有我的域名注册,一切似乎都与OAuth一致,但在我授权访问后,我得到这个错误:

I'm trying to access Gmail by using three-legged Oauth PHP code provided by Google ('google-mail-xoauth-tools') here: http://code.google.com/apis/gmail/oauth/code.html. I have my domain registered and everything seems to go fine with OAuth, but after I authorize access I get this error:

Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message
'cannot connect to host; error = Connection refused (errno = 111 )'
     in /home/tchaymor/public_html/gmail/Zend/Mail/Protocol/Imap.php:100
Stack trace: #0 /home/tchaymor/public_html/gmail/Zend/Mail/Protocol/Imap.php(61):           
                  Zend_Mail_Protocol_Imap->connect('imap.gmail.com', '993', true)
             #1 /home/tchaymor/public_html/gmail/three-legged.php(170):
                  Zend_Mail_Protocol_Imap->__construct('imap.gmail.com', '993', true)
             #2 {main} thrown in /home/tchaymor/public_html/gmail/Zend/Mail/Protocol/Imap.php on line 100 

是我第一次在任何Google产品上使用OAuth,所以它可能是我完全没有意识的东西。任何建议将是最受欢迎的(作为更容易选择的建议)。我更喜欢设计师而不是编码器,所以越简单越好。

This is my first time using OAuth with any Google products, so it could be something totally brainless I'm missing. Any suggestions would be most welcome (as suggestions for easier alternatives). I'm more on the designer rather than coder end, so the simpler the better.

推荐答案

实际上,这是失败的:

fsockopen('ssl://imap.gmail.com', 993);

几个选项:

1)错误提示谷歌正在主动阻止您,也许你已经测试&失败了一点,只需等待,直到临时封锁解除。

2)错误会有所不同,但只要确保:allow_url_fopen已启用?

3)本地防火墙? (服务器上的 telnet imap.gmail.com 993 会给你什么?)

4)破坏的OpenSLL库也可以尝试连接一个有效的https站点: fsockopen(ssl://google.com,443,$ errno,$ errstr)或die($ errstr);

Several options:
1) The error would suggest google is actively blocking you, perhaps you have tested & failed a bit to much, and just have to wait untill a temporary blockade is lifted.
2) The error would be different, but just to be sure: allow_url_fopen is enabled?
3) Local firewall? (What does a telnet imap.gmail.com 993 from the server give you?)
4) Broken OpenSLL libraries are also possible, try to connect a valid https site: fsockopen("ssl://google.com",443,$errno,$errstr) or die($errstr);

这篇关于Gmail三方OAuth访问 - Zend_Mail_Protocol_Exception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆