Unable to find the socket transport “ssl” in Zend framework 1.12

断了今生、忘了曾经 提交于 2019-12-11 08:36:33

问题


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?

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);

回答1:


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.




回答2:


as suggested openSSL is Not enable in your php..

Open php.ini
uncomment the following:
extension=php_openssl.dll

then restart the server..

Hope this helps, also you can use this http://www.php.net/manual/en/openssl.installation.php



来源:https://stackoverflow.com/questions/20499810/unable-to-find-the-socket-transport-ssl-in-zend-framework-1-12

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!