无法连接到ssl
问题描述:
我已经用wamp(Apache服务器)配置了openssl。但是,当我使用gdata API时,我得到以下错误。无法连接到ssl
(!) Fatal error: Uncaught exception 'Zend_Http_Client_Adapter_Exception' with message ' in C:\Zend_1_11_11\library\Zend\Http\Client\Adapter\Socket.php on line 234
(!) Zend_Http_Client_Adapter_Exception: Unable to Connect to ssl://accounts.google.com:443. Error #10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Zend_1_11_11\library\Zend\Http\Client\Adapter\Socket.php on line 234
有人帮我在这...
答
回答米哈伊尔我在高山上运行它并没有为我工作Linux和.dll只是Windows扩展。不要在Windows之外使用它,它只会添加警告。
解决我的问题:
我有一个自签名的证书,这是无法建立连接。
要检查它是否是问题,你可以提出一个要求:
wget的方式:
// not working:
wget https://accounts.google.com:443
// working:
wget https://accounts.google.com:443 --no-check-certificate
或卷曲方式:
// not working:
curl https://accounts.google.com:443
// working:
curl https://accounts.google.com:443 -k
为了临时解决它在我的dev搬运工容器,我添加了使用卷曲适配器并且没有检查证书的代码:
$config = array(
'adapter' => 'Zend_Http_Client_Adapter_Curl',
'curloptions' => [CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false]
);
$client = new Zend_Http_Client(url_combine([$this->_url, $call]), $config);
错误仅表示您无法连接到目标主机。您是否至少可以ping通accounts.google.com?你能够使用opessl命令连接到端口443就像“openssl s_client -connect accounts.google.com:443”吗?你可以尝试增加超时属性值 – rkosegi 2012-01-13 05:29:42
感谢您的输入,但我在代理服务器工作,所以我可以'ping任何:(对于窗口我需要安装openssl客户端 请让我知道我可以做一些其他的解决方法.. – Neelesh 2012-01-13 05:46:21
你回答自己。你是代理后面,你无法连接的原因。 – rkosegi 2012-01-13 05:48:15