简体   繁体   English

HelloAnalytics本地错误

[英]HelloAnalytics guzzle error in local

Fatal error: Uncaught exception 'GuzzleHttp\\Exception\\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html )' in C:\\xampp\\htdocs\\analytics\\vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlFactory.php:187 Stack trace: #0 C:\\xampp\\htdocs\\analytics\\vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlFactory.php(150): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array) #1 C:\\xampp\\htdocs\\analytics\\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 C:\\xampp\\htdocs\\analytics\\vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlHandler.php(43): GuzzleHttp\\Handler\\CurlFactory::finish(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory)) 致命错误:消息为“ cURL错误60”的未捕获异常“ GuzzleHttp \\ Exception \\ RequestException”:SSL证书问题:无法获取本地颁发者证书(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html )''在C:\\ xampp \\ htdocs \\ analytics \\ vendor \\ guzzlehttp \\ guzzle \\ src \\ Handler \\ CurlFactory.php:187堆栈跟踪:#0 C:\\ xampp \\ htdocs \\ analytics \\ vendor \\ guzzlehttp \\ guzzle \\ src \\ Handler \\ CurlFactory.php(150):GuzzleHttp \\ Handler \\ CurlFactory :: createRejection(Object(GuzzleHttp \\ Handler \\ EasyHandle),Array)#1 C:\\ xampp \\ htdocs \\ analytics \\ 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 C:\\ xampp \\ htdocs \\ analytics \\ vendor \\ guzzlehttp \\ guzzle \\ src \\ Handler \\ CurlHandler.php(43):GuzzleHttp \\ Handler \\ CurlFactory :: finish(Object(GuzzleHttp \\ Handler \\ CurlHandler),Object(GuzzleHttp \\ Handler \\ EasyHandle),Object(GuzzleHttp) \\ Handler \\ CurlFactory)) #3 C:\\xampp\\htdocs\\analytics\\vendor\\gu in C:\\xampp\\htdocs\\analytics\\vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlFactory.php on line 187 #3 C:\\ xampp \\ htdocs \\ analytics \\ vendor \\ gu在187行的C:\\ xampp \\ htdocs \\ analytics \\ vendor \\ guzzlehttp \\ guzzle \\ src \\ Handler \\ CurlFactory.php

Here the steps i have done: 我在这里完成的步骤:

1.installed the composer.exe from this Download Composer 1.从此下载Composer安装了composer.exe

2.then i have opened the command promt in that when i type composer i can see that the composer has installed on my pc. 2.然后我打开了promt命令,因为当我键入composer时,我可以看到该composer已安装在我的电脑上。

3.i have added a service account and downloaded my json file and incuded in the same project folder. 3.i添加了一个服务帐户并下载了我的json文件,并包含在同一项目文件夹中。

4.added tracking script to my website footer. 4.在我的网站页脚中添加了跟踪脚本。

5.when i run composer.json the google client library is downloaded. 5.当我运行composer.json时,将下载Google客户端库。

6.Added a HelloAnalytics.php to see the results. 6.添加了HelloAnalytics.php以查看结果。

when i start my xampp and run the HelloAnlytics page this guzzle error is coming how can i resolve this.? 当我启动我的xampp并运行HelloAnlytics页面时,即将出现这个令人讨厌的错误,我该如何解决呢?

1.I have downloaded cacert.pem file from this url cacert file download . 1.我已经从该URL cacert文件下载中下载了cacert.pem文件

  1. Save cacert.pem file in xampp/php/ext/cacert.pem 将cacert.pem文件保存在xampp / php / ext / cacert.pem中
  2. UN-comment and give the path to it in php.ini file: near line 1980 try finding ctrl + F curl 取消注释并在php.ini文件中提供路径:在1980行附近尝试查找ctrl + F curl

;curl.cainfo =

replace this line with this.. 用此替换此行。

curl.cainfo =C:\xampp\php\ext\cacert.pem

for details information of installation you can check it out here Description of how to integrate google analytic's 有关安装的详细信息,您可以在此处进行检查有关如何集成google analytics的说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM