微信开发的时,请求接口报错如下:

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 解决方法的更多相关文章

  1. ...cURL error 60: SSL certificate problem: unable to get local issuer certificate...

    问题描述: 在做PHP爬虫的时候, 安装了 guzzle 和 dom-crawler 之后, 调用的时候出现问题, 如下 报错内容:  Fatal error: Uncaught GuzzleHttp ...

  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. git学术

    点滴是为了生活,学术是为了未来.点滴经常看,学术用到的时候看看. #### git add 之后, git reset HEAD filename 和git checkout HEAD filenam ...

  2. 学会springboot多环境配置方案不用5分钟

    一 前言 本篇文章的主题是在springboot中写多个配置文件,指定让个配置文件生效,以便于达到在开发环境,测试环境,线上环境根据不同的配置灵活应用:读完本篇你将获得,学会springboot的多环 ...

  3. .net core 3.1 webapi后端接收钉钉小程序post的文件/图片

    世上本没路:走的人多了,便成了路. dd.uploadFile({ url: '请使用自己服务器地址', fileType: 'image', fileName: 'file', filePath: ...

  4. ThreadPoolExecutor之RejectedExecutionHandler

    最近工作种常用到ThreadPoolExecutor这个对象, 这是一个并发编程中非常常用的对象.因为和并发编程相关所以它存在于java.util.concurrent这包中. 创建这个对象的基本方法 ...

  5. ansible基本使用(一)

    ansible是什么? ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet.chef.func.fabric)的优点,实现了批量系统配置.批量程序部署.批量 ...

  6. Python爬虫库BeautifulSoup获取对象(标签)名,属性,内容,注释

    这篇文章主要介绍了Pythont特殊语法filter,map,reduce,apply使用方法,需要的朋友可以参考下(1)lambda lambda是Python中一个很有用的语法,它允许你快速定义单 ...

  7. IDEA最新注册码 (亲测有效,可激活至 2089 年~)

    申明:本教程 IntelliJ IDEA 破解补丁.激活码均收集于网络,请勿商用,仅供个人学习使用,如有侵权,请联系作者删除. 分享IDEA最新注册码 (亲测有效,可激活至 2089 年~) 注意 本 ...

  8. lucas定理及其拓展的推导

    lucas定理及其拓展的推导 我的前一篇博客-- lucas定理 https://mp.csdn.net/mdeditor/100550317#主要是给出了lucas的结论和模板,不涉及推导. 本篇文 ...

  9. python神器pycharm的安装

    1.下载PyCharm 官网下载:http://www.jetbrains.com/pycharm/download/#section=windows百度网盘下载:https://pan.baidu. ...

  10. memcached与redis比较

    1- memcached介绍 Memcached是一个自由开源的,高性能,分布式内存对象缓存系统. Memcached是以LiveJournal旗下Danga Interactive公司的Brad F ...