• 问题描述: 在做PHP爬虫的时候, 安装了 guzzle 和 dom-crawler 之后, 调用的时候出现问题, 如下
  • 报错内容: 
    Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in E:\project\my_test\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:186 Stack trace: #0 E:\project\my_test\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 E:\project\my_test\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 E:\project\my_test\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 E:\project\my_test\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHttp\Handler in E:\project\my_test\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 186

    这是在Windows下PHPstudy环境测试的, 没有在Linux上试验, 不知道Linux会不会出现这样的错误. 这里只说Windows的解决方案, Linux如果出现大概也是同样的解决方法.

  • 下载cacert.pem, 下载地址: https://curl.haxx.se/ca/cacert.pem
  • 修改php.ini的curl配置, 找到 [curl] 模块, 如下
    [curl]
    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    ;curl.cainfo =

    将之前下载的cacert.pem的绝对路径复制到  ---->   curl.cainfo="cacert.pem绝对路径", 例如: E:\project\my_test\curl_cainfo\cacert.pem 然后去掉注释, 重启PHPstudy.

...cURL error 60: SSL certificate problem: unable to get local issuer certificate...的更多相关文章

  1. cURL error 60: SSL certificate problem: unable to get local issuer certificate 解决方法

    微信开发的时,请求接口报错如下: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see ...

  2. curl: (60) SSL certificate problem: unable to get local issuer certificate

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...

  3. curl: (60) SSL certificate problem: unable to get local issuer certificate 错误

    今天同事做微信管理的项目,请求接口返回如下错误SSL certificate problem: unable to get local issuer certificate. 此问题的出现是由于没有配 ...

  4. 【error】git clone: SSL certificate problem: unable to get local issuer certificate

    报错: $ git clone https://github.XXX.git Cloning into 'XXX'... fatal: unable to access 'https://github ...

  5. SSL certificate problem unable to get local issuer certificate解决办法

    SSL certificate problem unable to get local issuer certificate 解决办法: 下载:ca-bundle.crt 将它放在自己的wamp或者x ...

  6. SSL certificate problem: unable to get local issuer certificate 的解决方法

    今天在进行微信开发获取微信Access_Token时,使用到了php的curl库, 在敲完代码后获取token失败,经过各种排查错误,到了下面这一步 SSL certificate problem: ...

  7. HTTP 599: SSL certificate problem: unable to get local issuer certificate错误

    自己在用 PySpider 框架爬虫运行代码后时出现 HTTP 599: SSL certificate problem: unable to get local issuer certificate ...

  8. git中的SSL certificate problem: unable to get local issuer certificate错误的解决办法

    我们在使用git初始化一个项目时,尤其是通过git submodule update --init --remote初始化子模块时,可能会遇到下面这个错误: fatal: unable to acce ...

  9. Git错误:unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get local issuer certificate

    fatal: unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get ...

随机推荐

  1. SQLite进阶-13.Autoincrement关键字

    目录 AUTOINCREMENT 是一个关键字,用于表中的字段值自动递增.我们可以在创建表时在特定的列名称上使用 AUTOINCREMENT 关键字实现该字段值的自动增加. 关键字 AUTOINCRE ...

  2. 【AtCoder】AGC009

    AGC009 A - Multiple Array 从后往前递推即可 #include <bits/stdc++.h> #define fi first #define se second ...

  3. php gd实现简单图片验证码与图片背景文字水印

    1.让水印文字铺满图片: 大致效果: 代码: <?php function appendSpreadTextMark($imageDir, $markText) { $fontFile = &q ...

  4. Python--类的调用

    类的调用 实例化 class Luffy: school = 'luffy' def __init__(self,name,age): self.Name = name self.Age = age ...

  5. springMVC接受json类型数据

    springMVC接受json格式的数据很简单 使用@RequestBody 注解,标识从请求的body中取值 服务端示例代码 @RequestMapping(value = "/t4&qu ...

  6. 常用javascript内置对象——String对象

    创建 String 对象的语法: 1:new String(s); :2:String(s); :3:直接赋值 String中属性 String中方法 <script> window.on ...

  7. C++单链表类(带头结点)

    Link.h #ifndef _LINK_0411 #define _LINK_0411 #include <string> #include <iostream> //定义数 ...

  8. [NOIP2018模拟10.15]比赛报告

    闲扯 昨晚又颓到好晚,Yali的降智光环感觉持续至今... 题面好评 T1T3都玩过 逃) T1没看多久就开始写二分+并查集 然后T3看着眼熟想了一个多小时...结果啥都没想出来 赶紧看T2发现还是没 ...

  9. Pytorch中的自编码(autoencoder)

    Pytorch中的自编码(autoencoder) 本文资料来源:https://www.bilibili.com/video/av15997678/?p=25 什么是自编码 先压缩原数据.提取出最有 ...

  10. Spring Cloud(O)服务的注册与发现(Eureka)

    一.微服务架构 1.1什么是分布式 不同模块部署在不同服务器上 作用:分布式解决网站高并发带来问题 1.2什么是集群 多台服务器部署相同应用构成一个集群 作用:通过负载均衡设备共同对外提供服务 1.3 ...