发生在Google API登录中的错误

时间:2018-07-04 19:04:55

标签: php google-api

有什么想法如何处理下一个错误?

Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 77: error setting certificate verify locations: CAfile: D:\xampp\htdocs>ca-bundle.crt CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in D:\xampp\htdocs\social_login\GoogleLogin\GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187 Stack trace: #0 D:\xampp\htdocs\social_login\GoogleLogin\GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 D:\xampp\htdocs\social_login\GoogleLogin\GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 D:\xampp\htdocs\social_login\GoogleLogin\GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(G in D:\xampp\htdocs\social_login\GoogleLogin\GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187

1 个答案:

答案 0 :(得分:0)

您是否已取消注释,并在php.ini的以下行中添加了一个值?

;openssl.cafile=

确保指定了这两个选项,并指向最新的证书包。


解决此问题的具体方法是:

  1. 下载cafile here
  2. 将其保存在D:\xampp\文件夹中,并命名为cacert.pem
  3. php.ini中的相关行更改为: openssl.cafile=d:\xampp\cacert.pem