Home » Php » ErrorException in StreamBuffer.php line 95: in laravel 5

ErrorException in StreamBuffer.php line 95: in laravel 5

Posted by: admin November 29, 2017 Leave a comment

Questions:

I transfer my application from Laravel 4 to Laravel 5, in sending email particularly in (reset Password).. I got this error

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL

Error messages: error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

but in laravel 4, it works.

Answers:

Try this, it worked for me (almost same as Raz Weizman btw):

if (!empty($this->_params['sourceIp'])) {
    $options['ssl']['verify_peer'] = false;
    $options['ssl']['verify_peer_name'] = false;
}

Questions:
Answers:

This error means that the SSL certificate verification is failing.
A quick fix would be to add to StreamBuffer.php these lines right after the condition:

if (!empty($this->_params[‘sourceIp’]))

$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;

Questions:
Answers:

If you are using basically Windows for development this is the common problem.

Changing your mail driver to “mail” from “smtp” will help.

Questions:
Answers:

I faced similar problem so I set

MAIL_ENCRYPTION= in .env file.

and it worked fine for me.

Questions:
Answers:

you can use google app password ,for me it worked after changing the gmail password with app password you can do that by visiting my account>sign in>

Questions:
Answers:

Go to location \vendor\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php en la linea 259.Comment the following:

//$options = array();

and add.
$options[‘ssl’] = array(‘verify_peer’ => false, ‘verify_peer_name’ => false, ‘allow_self_signed’ => true);

:D!