php-openssl-failed-to-enable-crypto

Last Updated:

2022-08-12

routines:ssl3_get_server_certificate:certificate verify failed 
 Failed to enable crypto

post

step1 查看本机php使用的证书地址

 php -r "var_dump(openssl_get_cert_locations());"

step2 确认step1输出的地址里头default_cert_file地址对应有证书文件

step3 step2里头没有证书的话,下载或者替换

 wget http://curl.haxx.se/ca/cacert.pem

然后这个wget下载来的新证书,放到 step1得到的证书地址处

sudo mv cacert.pem /opt/lampp/share/openssl/cert.pem