无法找到套接字传输“ssl"在 Zend 框架 1.12 中 [英] Unable to find the socket transport "ssl" in Zend framework 1.12

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

问题描述

我尝试从我的系统发送电子邮件,但收到此错误消息.

i tried to sent email from my system but got this error messages.

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

我已经看到其他人的类似帖子,但无法解决我的问题.我试图将我的代码从ssl"更改为tls",但得到了另一个错误.由于我将项目上传到大学服务器,因此我无法对服务器配置进行任何操作.这是我目前的代码:

i already see the others similar post but can't resolve my problem. i tried to change my code from "ssl" to "tls' but get1 the another error. Since i upload my project into University server, so i can't do anything with server configuration. This is my code so far :

$config = array('ssl' => 'ssl',
            'auth' => 'login',
            'username' => 'somename@gmail.com',
            'password' => 'password');

$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);

$email = 'somename1@gmail.com';
$username = 'John';
$mail = new Zend_Mail();
$mail->setBodyHtml("sdsd");
$mail->setFrom('somename@gmail.com');
$mail->addTo($email, $username);
$mail->setSubject('Profile Activation');
$mail->send($transport);

推荐答案

OpenSSL 支持未在您的 Web 服务器上启用.您可以使用 phpinfo() 来查看您的 PHP 安装支持哪些扩展.如果 OpenSSL 不是其中之一,那么使用 SSL 或 TLS 就不走运了.

OpenSSL support isn't enabled on your web server. You can use phpinfo() to see what extensions your PHP installation supports. If OpenSSL isn't one of them you're out of luck using SSL or TLS.

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

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