Answer the question
In order to leave comments, you need to log in
How does the problem cause an error, how to solve it in CentOS7 when using the PHP function get_headers(): SSL operation failed with code 1(OpenSSL Error)?
A few days ago I started getting an error when using get_headers()/file_get_contents():
get_headers(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
'ssl' => [
'cafile' => '/path/to/bundle/cacert.pem',
'verify_peer'=> true,
'verify_peer_name'=> true,
],
Answer the question
In order to leave comments, you need to log in
Judging by the size, your CA base is generally empty.
yum update ca-certificates
or yum reinstall ca-certificates
(or in more detail https://access.redhat.com/solutions/1549003 )
It's strange, of course, that curl works... Do curl --cacert dummy_xxx https://www.google.com
- should show the used folder with CA certificates.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question