Unable to find the socket transport "ssl" – did you forget to enable it when you configured PHP?

标签: , ,

用PHPMailer发送邮件不成功,错误信息是“Unable to find the socket transport "ssl" – did you forget to enable it when you configured PHP?”

Google了一下,原因是PHP不支持SSL,可能是编译的时候就不支持,也可能是在配置文件中没有加载opensll扩展。

解决方案:

Windows下,在php.ini中打开opensll扩展,并将php目录下的libeay32.dll和ssleay32.dll两个库拷贝到System32下;

Linux下,重新编译php,编译时加上参数–enable-ssl(具体参看configure的help)。

赞赏

微信赞赏支付宝赞赏

随机文章:

  1. 利用 WindowsInstaller.Installer 对象计算文件 MD5 hash 值
  2. IPv6免费传文件——uTorrent鲜为人知的功能
  3. 微软的VBScript教程
  4. 本地机器和Windows 2003远程桌面之间复制粘贴文件
  5. 用C语言实现凯撒密码算法

留下回复