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

查看:153
本文介绍了套接字传输"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.

所以我:

  • 在Windows路径中添加了C:\ PHP \ ext
  • 将libeay32.dll和ssleay32.dll添加到C:\ WINDOWS \ system32 \ inetsrv
  • 重新启动服务器

我不确定其中哪一个可以解决我的问题,但是现在已经确定了! :)

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

我发现可以在此页面上尝试以下操作: http://php.net/manual/zh/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天全站免登陆