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

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. 配置nginx代理服务器访问tomcat服务

    nginx原配置文件如下: #user nobody; worker_processes ; #error_log logs/error.log; #error_log logs/error.log ...

  2. window.location操作url对象

    URL即:统一资源定位符 (Uniform Resource Locator, URL) 完整的URL由这几个部分构成:scheme://host:port/path?query#fragment s ...

  3. UnsupportedClassVersionError : 不支持的类版本错误

    UnsupportedClassVersionError : 不支持的类版本错误 listenerStart配置类的应用程序侦听器时出错 listenerStart Error configuring ...

  4. 前端的Cookies

    Cookies cookies 特性 前端数据存储 后端通过 HTTP 头设置 请求时通过 HTTP 头传给后端 前端可读可写 遵守同源策略 域名 有效期 路径 http-only secure(ht ...

  5. 在本地搭建git服务器

    GitHub就是一个免费托管开源代码的远程仓库.但是对于某些视源代码如生命的商业公司来说,既不想公开源代码,又舍不得给GitHub交保护费,那就只能自己搭建一台Git服务器作为私有仓库使用. 搭建Gi ...

  6. RHEL6 yum本地源配置

    RHEL6 yum本地源配置 将RHEL6 的iso上传到/file1/xxx 新建目录/file1/xxx/mnt,将iso挂载到mnt目录 mount rhel-server-6.3-x86_64 ...

  7. javascript单词

    abstract n. 摘要,抽象的东西 adj. 抽象的,理论的 vt. 移除,摘要,偷 vi. 做摘要 do aux. 助动词(无词意) v. 干,做 if conj. 如果,是否,即使 n. 条 ...

  8. 纪中20日c组模拟赛T1 2121. 简单游戏

    T1 2121. 简单游戏 (File IO): input:easy.in output:easy.out 时间限制: 1000 ms  空间限制: 262144 KB  具体限制 Goto Pro ...

  9. 剑指offer-面试题4-二维数组中的查找-数组

    /* 题目: 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序. 请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数. */ /* 解题 ...

  10. wordpress<=4.6版本任意命令执行漏洞

    漏洞简述 当WordPress 使用 PHPMailer 组件向用户发送邮件.攻击者在找回密码时会使用PHPmailer发送重置密码的邮件,利用substr(字符串截取函数).$run(系统调用函数) ...