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

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. .NET面试题整理(持续更新)

    1.已知值类型保存在线程栈中,引用类型保存在堆中 struct Point{ public int x,y; } public sealed class program{ public static ...

  2. js能力测评——查找元素的位置

    查找元素的位置 题目描述: 找出元素 item 在给定数组 arr 中的位置 输出描述: 如果数组中存在 item,则返回元素在数组中的位置,否则返回 -1 示例1 输入 [ 1, 2, 3, 4 ] ...

  3. .net List回收

    转 static void Main(string[] args) { List<int> list = new List<int>(); for (int i = 0; i ...

  4. MySQL 什么是事务?

    该文为< MySQL 实战 45 讲>的学习笔记,感谢查看,如有错误,欢迎指正 一.事务简介 事务就是为了保证一组数据库操作,要么全部成功,要么全部失败. 事务是在引擎层实现的,也就是说并 ...

  5. centos5,6 系统启动流程

    linux内核特点: 支持模块化:模块文件的名字以.ko(kernel object)结尾 支持内核运行时,动态加载和卸载模块文件. linux内核组成部分: 核心文件:/boot/vmlinuz-V ...

  6. winForm学习 2019年4月11日

    1.Directory静态类 相似类:File.Path.StreamReader.StreamWirter 创建文件夹:Directory.CreateDirectory 删除文件夹:Directo ...

  7. Remoting、WCF、WebAPI、WCFREST、WebService之间的区别与联系

    在.net平台下,有大量的技术让你创建一个服务,像Web Service,WCF,Web API,Remoting,我们来对比一下他们的区别与联系 Remoting Web Service WCF W ...

  8. jQuery---jQuery插件

    jQuery插件 使用插件的步骤 1. 引入jQuery文件 2. 引入插件(如果有用到css的话,需要引入css) 3. 使用插件 <!--1. 引入jquery的js文件--> < ...

  9. 有关使用phpstudy搭建sqli-lab环境搭建时发生Uncaught Error: Call to undefined function mysql_connect()错误

    文章更新于2020-1-30 问题描述 Uncaught Error: Call to undefined function mysql_connect() 分析 经查php手册可知 mysql_co ...

  10. 适合小白的大白话讲解--->Git与Github的区别

    本文由 伯乐在线 - 听风 翻译,艾凌风 校稿.未经许可,禁止转载!英文出处:Red Radger.欢迎加入翻译组. 本文旨在使用通俗易懂的文字,讲解版本控制背后的理论,以便你能对程序员们如何工作有个 ...