如何修复 stream_socket_enable_crypto():SSL 操作失败,代码为 1 [英] how to fix stream_socket_enable_crypto(): SSL operation failed with code 1
问题描述
stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
我使用的是 Laravel 4.2、PHP 5.6、Apache 2.4
Im using Laravel 4.2, PHP 5.6, Apache 2.4
我在 Amazon ec2 Linux 中安装了 GoDaddy SSL.
I have GoDaddy SSL installed in Amazon ec2 Linux.
当我使用 https 访问网站时,SSL 工作正常.
SSL working fine when i visit the site with https.
当我调用我的函数时发生错误:
The error happened when I call my function :
<?php
public function sendEmail()
{
Mail::send ( 'emails.code.code', $data, function ($sendemail) use($email) {
$sendemail->from ( 'info@me.com', 'Me Team' );
$sendemail->to ( $email, '' )->subject ( 'Activate your account' );
} );
}
?>
我读了一些关于这个的文章,他们说有些东西我们应该做一些改变,他们把代码放了,但我不知道在哪里插入.
I read some articles about this, they said that there are things we should make some changes, they put that code but i don't know where to insert it.
和这个php文档http://php.net/manual/en/migration56.openssl.php 难以理解.
and this documentation of php http://php.net/manual/en/migration56.openssl.php which is hard to understand.
所以我的问题是如何解决这个问题?
So my question is how to solve this problem?
推荐答案
尝试更改 app/config/email.php
smtp
到 mail
这篇关于如何修复 stream_socket_enable_crypto():SSL 操作失败,代码为 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!