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 http://curl.haxx.se/libcurl/c/libcurl-errors.html)
1、下载cacert
下载地址:https://curl.haxx.se/ca/cacert.pem
2、修改 php.ini , 并重启
在php.ini中找到curl.cainfo改为文件的绝对路径如:curl.cainfo =E:\phpstudy\PHPTutorial\php\php-7.2.1-nts\cacert.pem
注意事项:
需要开启 php_curl、php_openssl 扩展;
如果是用php curl() 方法的话。可以 清除ssl证书校验:
<?php
// 创建curl资源
$ch = curl_init();
// 设置url
curl_setopt($ch, CURLOPT_URL, "https://www.test.com");
// 将Transfer作为字符串返回
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// 关闭SSL验证
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
// 执行并输出
$output = curl_exec($ch);
// 查看错误
$error = curl_error($ch);
echo $error;
// 释放curl资源
curl_close($ch);
cURL error 60: SSL certificate problem: unable to get local issuer certificate 解决方法的更多相关文章
- ...cURL error 60: SSL certificate problem: unable to get local issuer certificate...
问题描述: 在做PHP爬虫的时候, 安装了 guzzle 和 dom-crawler 之后, 调用的时候出现问题, 如下 报错内容: Fatal error: Uncaught GuzzleHttp ...
- 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 ...
随机推荐
- 让div充满整个body
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- vue自带的实例属性和方法($打头)
Vue 实例内置了一些有用的实例属性与方法.它们都有前缀 $,以便与用户定义的属性区分开来.例如: var data = { a: 1 } var vm = new Vue({ el: '#examp ...
- 从零构建Flink SQL计算平台 - 1平台搭建
一.理想与现实 Apache Flink 是一个分布式流批一体化的开源平台.Flink 的核心是一个提供数据分发.通信以及自动容错的流计算引擎.Flink 在流计算之上构建批处理,并且原生的支持迭代计 ...
- Go Web爬虫并发实现
题目:Exercise: Web Crawler 直接参考了 https://github.com/golang/tour/blob/master/solutions/webcrawler.go 的实 ...
- 硬件知识整理part3--电阻在单片机系统中的应用
邦有道,如矢:邦无道,如矢. --孔子 电阻在电路中主要功能是限流和分压等等.在单片机系统中自然也是. 电阻作为限流应该是最常用的应用之一,对于单片机外围设计来说,电阻的应用非常重要,在很多时候,我 ...
- Python爬虫连载3-Post解析、Request类
一.访问网络的两种方法 1.get:利用参数给服务器传递信息:参数为dict,然后parse解码 2.post:一般向服务器传递参数使用:post是把信息自动加密处理:如果想要使用post信息,需要使 ...
- grep 基本用法
grep usage: grep [options]... pattern [file]... 如果file缺省,会从 stdin 读取 $ grep --help -i 忽略大小写 -n 显示行号 ...
- Charles抓包工具的破解以及使用
一.破解 官网下载Charles 下载Charles.jar ,然后按照后在Charles→lib中替换掉Charles.jar 链接:https://pan.baidu.com/s/1XZ-aZI5 ...
- Electron – 基础学习(2): 项目打包成exe桌面应用 之electron-packager
项目创建完成,启动正常,接下来就是项目打包了.将测试Demo打包成exe桌面应用,点击exe文件,运行项目. 书接上文,创建项目有三种方式 Git拷贝.直接创建:通过electron社群提供的命令行工 ...
- 使用pem连接服务器
后台同学甩给你一个pem文件,username@IP后如何链接服务器 准备:ssh客户端 例子xshell 文件->新建->主机(连接界面主机输入框输入IP)->点击用户身份-> ...