相关疑难解决方法(0)

PHP中的套接字传输"ssl"未启用

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

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

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

  • 取消注释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,但我没有运气.有什么明显的我做错了吗?无论如何要在较小的部分进行故障排除吗?(所以我可以通过消除过程找出问题......?)

不幸的是,Windows/IIS不是我的专业领域 - 我一直负责,因为似乎没有人知道任何事情.

php ssl iis-6 fsockopen

53
推荐指数
5
解决办法
14万
查看次数

无法找到套接字传输"ssl" - 您是否忘记在配置PHP时启用它?

我正在谷歌上搜索这个错误很多小时.我没有运气就尝试过这个主题的所有解决方案.<? phpinfo(); ?>(唯一的区别是我使用的是Appserver而不是IIS)它没有显示任何与SSL相关的内容.我还应该尝试什么?

完整的错误消息:

<b>Warning</b>:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?) in <b>C:\AppServ\www\webgitz\test\class.smtp.php</b> on line <b>122</b><br />
SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (27010016)
Run Code Online (Sandbox Code Playgroud)

和代码:

<?php 

require_once "validation.php";

require_once "PHPMailer.php";


require_once "class.smtp.php";

$email= "foo@gmamcil.com";

$mail = …
Run Code Online (Sandbox Code Playgroud)

php sockets windows apache ssl

21
推荐指数
1
解决办法
7万
查看次数

标签 统计

php ×2

ssl ×2

apache ×1

fsockopen ×1

iis-6 ×1

sockets ×1

windows ×1