套接字传输“ssl"在 PHP 中未启用 [英] Socket transport "ssl" in PHP not enabled

查看:23
本文介绍了套接字传输“ssl"在 PHP 中未启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 PHP 中启用套接字传输ssl"时遇到问题.当我运行我的脚本时,出现错误:

I'm having trouble enabling the socket transport "ssl" in PHP. When I run my script, I get the error:

警告:fsockopen()[function.fsockopen]:无法连接到 ssl://www.my.site.com:443(无法找到套接字传输ssl" - 您是否忘记启用它当你配置 PHP 时?)

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.my.site.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

我在 Windows 上运行 IIS6,这是我到目前为止所做的尝试让它工作:

I'm running IIS6 on Windows and this is what I've done so far to try to get it working:

  • 取消注释 php.ini 中的 php_openssl.dll 和 php_sockets.dll 扩展
  • 确保 PHP 正在加载我对其进行更改的 ini 文件(确实如此,而且它肯定正在加载其他扩展,所以我很确定这不是问题)
  • 确保 php_openssl.dll 和 php_sockets.dll 位于正确的位置
  • 将 ssleay32.dll 和 libeay32.dll 复制到 PHP 主文件夹、WINDOWS 文件夹和 WINDOWS/system32 文件夹
  • 确保 Windows 路径变量包含 PHP 的位置
  • 确保所有相关文件的文件权限都正确.

几乎每次更改后我都重新启动了 IIS,但我没有任何运气.有什么明显的我做错了吗?有没有办法在较小的部分解决这个问题?(所以我可以通过淘汰的过程找出问题......?)

I've restarted IIS after pretty much every change, but I haven't had any luck. Is there anything obvious that I'm doing wrong? Is there anyway to troubleshoot this in smaller parts? (So I can figure out the problem by the process of elimination...?)

不幸的是,Windows/IIS 不是我的专业领域——我被任命负责,因为其他人似乎什么都不知道.

Unfortunately Windows/IIS aren't my area of expertise--I've been put in charge because nobody else seems to know anything.

推荐答案

成功!

在检查日志文件并确保 php_openssl.dll 的权限正确后,我搜索了警告并找到了更多尝试.

After checking the log files and making sure the permissions on php_openssl.dll were correct, I googled the warning and found more things to try.

所以我:

  • 将 C:PHPext 添加到 Windows 路径
  • 将 libeay32.dll 和 ssleay32.dll 添加到 C:WINDOWSsystem32inetsrv
  • 重启服务器

我不确定其中哪些解决了我的问题,但现在肯定已经解决了!:)

I'm not sure which of these fixed my problem, but it's definately fixed now! :)

我在此页面上找到了要尝试的以下内容:http://php.net/manual/en/install.windows.extensions.php

I found these things to try on this page: http://php.net/manual/en/install.windows.extensions.php

感谢您的帮助!

这篇关于套接字传输“ssl"在 PHP 中未启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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