关于“SSL证书问题:无法获取本地颁发者证书”错误

1)从https://curl.haxx.se/ca/cacert.pem下载最新的cacert.pem

2)将以下行添加到php.ini(如果这是共享托管,并且您无法访问php.ini,那么可以在public_html中添加到.user.ini)

curl.cainfo= cacert.pem文件路径(注意是否被注释了)

3)默认情况下,FastCGI进程将每隔300秒解析新文件(如果需要,可以通过添加几个文件来更改频率,如https://ss88.uk/blog/fast-cgi-and-user-ini -files-the-new-htaccess)

但是,下载的证书不可用,然后只好用

https://github.com/bagder/ca-bundle/blob/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt

链接提供的证书解决了问题。

将下载的证书放在php.ini的当前目录下的extras/ssl/下面。

然后在php.ini文件中加入

curl.cainfo="真实路径/ca-bundle.crt"(curl扩展是必须开启的)

你可能感兴趣的:(关于“SSL证书问题:无法获取本地颁发者证书”错误)