错误:stream_socket_enable_crypto():在laravel 5.2中,SSL操作失败,代码为1. [英] Error: stream_socket_enable_crypto(): SSL operation failed with code 1. in laravel 5.2

查看:240
本文介绍了错误:stream_socket_enable_crypto():在laravel 5.2中,SSL操作失败,代码为1.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我想在注册过程后将我的用户重定向到电子邮件验证页面,并要求他/她输入发送到他/她的电子邮件的验证码.如果您告诉我该过程或向我推荐任何教程,我将很高兴.

Actually,I want to redirect my user to the email verification page after signup process and asking him/her to enter the verification code sent to his/her email. I will be glad if you tell me the process or recommend me any tutorial.

我已经建立了我的工作认证系统.我在互联网上进行了很多搜索,但是我所能找到的就是我未使用的laravel auth的要求.

I have already made my working authentication system . I have searched a lot on internet but all i can find is the requirement of laravel auth which i am not using.

注册时出现错误:

stream_socket_enable_crypto():SSL操作失败,代码为1. OpenSSL错误消息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

如果您需要查看我的代码,请告诉我.我将其发布.

If you need to see my code , just tell me. I'll post it.

UserController.php: http://laravel.io/bin/nQreq Routes.php: http://laravel.io/bin/JxjNB

UserController.php: http://laravel.io/bin/nQreq Routes.php:http://laravel.io/bin/JxjNB

推荐答案

您应该在/config/mail.php中添加以下代码(适用于laravel 5.4)

You should add below code in /config/mail.php ( worked on laravel 5.4 )

'stream' => [
'ssl' => [
    'allow_self_signed' => true,
    'verify_peer' => false,
    'verify_peer_name' => false,
],
],

和.env邮件设置将类似于

and .env mail setting will be something like

    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.gmail.com
    MAIL_PORT=587
    MAIL_USERNAME=yourEmail
    MAIL_PASSWORD=youPassword
    MAIL_ENCRYPTION=tls

这篇关于错误:stream_socket_enable_crypto():在laravel 5.2中,SSL操作失败,代码为1.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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