gpt4 book ai didi

php - 未捕获的 CurlException : 77 : error setting certificate verify locations

转载 作者:行者123 更新时间:2023-12-02 02:38:19 32 4
gpt4 key购买 nike

我不断收到同样的错误。我刚刚安装了 SSL,但没有成功。我已经检查了所有其他帖子,但似乎没有一个解决方案适合我。

有人知道我应该做什么吗?

Fatal error: Uncaught CurlException: 77: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none thrown in /home/acmesoft/public_html/Oddsmaker/php_sdk/base_facebook.php on line 977

if ($result === false) {
$e = new FacebookApiException(array(
'error_code' => curl_errno($ch),
'error' => array(
'message' => curl_error($ch),
'type' => 'CurlException',
),
));
curl_close($ch);
throw $e;
}
curl_close($ch);
return $result;

最佳答案

Riyanto Wibowo 的回复很危险,因为您实际上是在关闭 SSL。走那条路要小心。来自comment on the php manual :

Please everyone, stop setting CURLOPT_SSL_VERIFYPEER to false or 0. If your PHP installation doesn't have an up-to-date CA root certificate bundle, download the one at the curl website and save it on your server:

http://curl.haxx.se/docs/caextract.html

Then set a path to it in your php.ini file, e.g. on Windows:

curl.cainfo=c:\php\cacert.pem

Turning off CURLOPT_SSL_VERIFYPEER allows man in the middle (MITM) attacks, which you don't want!

我本想将此作为评论发布,但我没有足够的声誉。

关于php - 未捕获的 CurlException : 77 : error setting certificate verify locations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15149308/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com