...cURL error 60: SSL certificate problem: unable to get local issuer certificate...
- 问题描述: 在做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...的更多相关文章
- 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 ...
- curl: (60) SSL certificate problem: unable to get local issuer certificate
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...
- curl: (60) SSL certificate problem: unable to get local issuer certificate 错误
今天同事做微信管理的项目,请求接口返回如下错误SSL certificate problem: unable to get local issuer certificate. 此问题的出现是由于没有配 ...
- 【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 ...
- SSL certificate problem unable to get local issuer certificate解决办法
SSL certificate problem unable to get local issuer certificate 解决办法: 下载:ca-bundle.crt 将它放在自己的wamp或者x ...
- SSL certificate problem: unable to get local issuer certificate 的解决方法
今天在进行微信开发获取微信Access_Token时,使用到了php的curl库, 在敲完代码后获取token失败,经过各种排查错误,到了下面这一步 SSL certificate problem: ...
- HTTP 599: SSL certificate problem: unable to get local issuer certificate错误
自己在用 PySpider 框架爬虫运行代码后时出现 HTTP 599: SSL certificate problem: unable to get local issuer certificate ...
- git中的SSL certificate problem: unable to get local issuer certificate错误的解决办法
我们在使用git初始化一个项目时,尤其是通过git submodule update --init --remote初始化子模块时,可能会遇到下面这个错误: fatal: unable to acce ...
- 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 ...
随机推荐
- 使用pycharm开发web——django2.1.5(五)表单和通用视图
看了刘江老师教程这么多天,卧槽,我才发现他也曾跻身于行伍之间,interesting 刘老师这波讲解很到位,告诉你如何编写单例视图的时候忽然告诉你,其实不用这么麻烦,我们有通用视图,那些总是要做相似的 ...
- ORACLE查询进程,并杀死
用于存放常用SQL --查询主键在哪一列 --设置页大小 --设置行大小 col COLUMN_NAME for a20 --设置字段显示长度 col TABLE_NAME for a20 col O ...
- Educational Codeforces Round 74 (Rated for Div. 2)补题
慢慢来. 题目册 题目 A B C D E F G 状态 √ √ √ √ × ∅ ∅ //√,×,∅ 想法 A. Prime Subtraction res tp A 题意:给定\(x,y(x> ...
- vue的 :class 与 :style 的讲解
Vue样式: Vue中通过属性绑定为元素的class样式 第一种使用方式:直接传递一个数组 注意:这里的class需要使用v-bind做数据绑定 第二种使用方式:在数组中使用三元表达式 第三种使用方式 ...
- Python爬虫详解
Python爬虫详解 Python 之 Urllib库的基本使用 Python中requests库使用方法详解 Beautifulsoup模块基础用法详解 selenium模块基础用法详解 re(正则 ...
- 有趣的后渗透工具 Koadic
koadic是DEFCON黑客大会上分享出来的的一个后渗透工具,虽然和msf有些相似,但是Koadic主要是通过使用Windows ScriptHost(也称为JScript / VBScript)进 ...
- python 爬取文章后存储excel 以及csv
import requests from bs4 import BeautifulSoup import random import openpyxl xls=openpyxl.Workbook() ...
- linux命令自动补全
在linux中命令较长时,不易记忆,使用命令行自动补全,使用方便,配置方法记录如下 需要安装bash-completion 重启后生效 命令:yum install bash-completion,安 ...
- Scala学习十六——XML处理
一.本章要点 XML字面量<like>this</like>的类型为NodeSeq 可以在XML字面量中内嵌Scala代码 Node的child属性产出后代节点 Node的at ...
- SpringBoot 异步调用方法并接收返回值
项目中肯定会遇到异步调用其他方法的场景,比如有个计算过程,需要计算很多个指标的值,但是每个指标计算的效率快慢不同,如果采用同步执行的方式,运行这一个过程的时间是计算所有指标的时间之和.比如: 方法A: ...