我在PHP中启用套接字传输"ssl"时遇到了问题.当我运行我的脚本时,我收到错误:
警告:fsockopen()[function.fsockopen]:无法连接到ssl://www.my.site.com:443(无法找到套接字传输"ssl" - 您是否忘记在配置PHP时启用它? )
我正在Windows上运行IIS6,这是我到目前为止所做的尝试让它工作:
我几乎每次改变后都重新启动了IIS,但我没有运气.有什么明显的我做错了吗?无论如何要在较小的部分进行故障排除吗?(所以我可以通过消除过程找出问题......?)
不幸的是,Windows/IIS不是我的专业领域 - 我一直负责,因为似乎没有人知道任何事情.
我正在谷歌上搜索这个错误很多小时.我没有运气就尝试过这个主题的所有解决方案.<? 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 "ssl" - 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)