Home > Backend Development > PHP Tutorial > How to Fix \'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed\' in L

How to Fix \'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed\' in L

DDD
Release: 2024-10-29 12:45:02
Original
561 people have browsed it

How to Fix

Laravel certificate verification error while sending TLS email

You are encountering certificate verification error while sending TLS email using Laravel, error message For "stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed".

To resolve this error, check whether your server automatically manages the trusted certificate store. If not, follow these steps:

  1. Download the cURL cacert.pem certificate package.
  2. Place cacert.pem wherever you like; if you have self-signed certificates that need to be accepted, open the package in a text editor and add them to the end of the file.
  3. Edit php.ini to reference this file location:
curl.cainfo = D:/Servers/php/sslfiles/cacert.pem
openssl.cafile = D:/Servers/php/sslfiles/cacert.pem
Copy after login
  1. Restart PHP-FPM or your web server, depending on how you are running PHP. After following these steps, your Laravel application will be able to send emails using TLS without certificate validation errors.

The above is the detailed content of How to Fix 'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed' in L. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template