本文介绍了如何修复stream_socket_enable_crypto():SSL操作失败,代码为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.

调用函数时发生错误:

<?php

public function sendEmail()
{
        \Mail::send ( 'emails.code.code', $data, function ($sendemail) use($email) {
            $sendemail->from ( '[email protected]', '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.

阅读此书: https://www.mimar.rs/en/sysadmin/2015/php-5-6-x-ssltls-peer-certificates-and-hostnames-verified-by-default/

和此php文档 http://php.net/manual/zh/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

smtpmail

这篇关于如何修复stream_socket_enable_crypto():SSL操作失败,代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 18:46