Skip to content

Instantly share code, notes, and snippets.

@apimaker001
Created February 20, 2021 09:49
Show Gist options
  • Save apimaker001/89f8932205757f677dd19f283260156b to your computer and use it in GitHub Desktop.
Save apimaker001/89f8932205757f677dd19f283260156b to your computer and use it in GitHub Desktop.
OpenSSL and certificate verify failed error + cURL error 60
PHP, OpenSSL and certificate verify failed error + cURL error 60
Some times you may receive this error:
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
How to fix:
Download https://curl.haxx.se/ca/cacert.pem
In php.ini add openssl.cafile="/path/to/cacert.pem".
This how to can also fix "cURL error 60".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment