fsockopen()和SSL错误,“无法启用加密" [英] Error with fsockopen() and SSL, 'Failed to enable crypto'

查看:319
本文介绍了fsockopen()和SSL错误,“无法启用加密"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到Nominet EPP测试台,但是我收到一个无法启用加密",这似乎是罕见的错误,没有记录在案的解决方案或原因.

I am trying to connect to the Nominet EPP test bed, but I am receiving a 'Failed to enable crypto' which seems to be a rare error with no documented solution or cause.

所在行:

$socket = fsockopen('ssl://testbed-epp.nominet.org.uk', 700, $errno, $errst, 10);

我得到的确切错误是:

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /path/classes/nominet_epp.class.php on line 53

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://testbed-epp.nominet.org.uk:700 (Unknown error) in /path/classes/nominet_epp.class.php on line 53

据我所知,在我们的phpinfo()中,OpenSSL已安装好PHP,

As far as I can tell OpenSSL is installed with PHP fine, as per this in our phpinfo():

OpenSSL support     enabled
OpenSSL Version     OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

Nominet的文档简要提到:为了验证安全服务器的身份,您将需要可从www.verisign.com免费获得的 Verisign 3类公共主要证书颁发机构的根证书(该证书也已分发使用大多数网络浏览器).-这可能是问题所在吗?

The Nominet docs briefly mention "In order to verify the identity of the secure server you will need the Verisign Class 3 Public Primary Certification Authority' root certificate available free from www.verisign.com (the certificate is also distributed with most web browsers). - This could possibly be the issue?

更新 根据要求,我已将错误值以及$ socket本身设为var_dump'd,它们均为false/0. fsockopen PHP文档指出"如果errno中返回的值为0,并且该函数返回FALSE,表示该错误发生在connect()调用之前.这很可能是由于初始化套接字时遇到的问题."

Update As requested, I have var_dump'd the error values as well as $socket itself, they are all false/0. The fsockopen PHP docs states "If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket."

任何帮助将不胜感激.

推荐答案

我遇到了完全相同的问题,这归因于Nominet Firewall没有使用正确的IP地址进行更新.当您在Nominet控制面板中进行设置时,您需要等待一个小时,以使其防火墙完全更新-完成此操作后,连接即可正常工作.

I had exactly the same issue and it was down to the Nominet Firewall not being updated with the correct IP address. When you set this up in the Nominet control panel you need to wait an hour for their firewalls to fully update - once this is done the connection works fine.

这篇关于fsockopen()和SSL错误,“无法启用加密"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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