phpstudy提示错误:cURL error 60 配置SSL CA证书

hykeda2小时前PHP2

phpstudy配置SSL CA证书

本地Windows环境, phpstudy 集成 php7 后,出现错误提示:
cURL error 60: SSL certificate problem: unable to get local issuer certificate
查询问题:SSL CA证书配置缺失导致。

1、从CURL 官网下载CA 证书(cacert.pem)

可 选择下载:https://curl.haxx.se/docs/caextract.html

或 直接下载:https://curl.haxx.se/ca/cacert.pem

2、找到 phpstudy 安装路径,对应php版本包

例 安装路径下 php包:D:\phpstudy_pro\Extensions\php\php7.3.4nts

将下载的cacert.pem文件,放入 \extras\ssl\ 文件夹

3、修改配置 php.ini 文件

启用openssl, curl扩展

extension=curl
extension=openssl

然后修改两处CA 证书存放位置

curl.cainfo = "D:\phpstudy_pro\Extensions\php\php7.3.4nts\extras\ssl\cacert.pem"
openssl.cafile="D:\phpstudy_pro\Extensions\php\php7.3.4nts\extras\ssl\cacert.pem"
标签: sslphpstudycurl

相关文章

php json_encode输出空白问题

php json_encode输出空白问题

例如这样的一段转json出现空白: echo json_encode(array('error' => '0', 'message' => '没有错误')); var_dump(js...

百度经纬度和火星坐标转换

<?php     //GCJ-02...

file_get_contents和curl出现400 Bad Request问题

我在使用这两个函数抓取数据的时候出现了400错误,一开始以为是http和https的问题,以为https证书问题,忽略证书后还是报400,但是输入百度的网址都正常。 其实是url参数...

关于PHP处理BOM头的问题

关于php出现无法解析数据,直接var_dump出来为string(3)"",必须警觉,极大可能就是存在bom头的问题,比如接收json数据 $rt = json_decode($r...

查找附近geohash算法及实现 (PHP版本)

随着移动终端的普及,很多应用都基于LBS功能,附近的某某(餐馆、银行、妹纸等等)。 基础数据中,一般保存了目标位置的经纬度;利用用户提供的经纬度,进行对比,从而获得是否在附近。 目标:...

抓取页面出现乱码

在抓取页面的时候出现类似�������这样乱码解决方法如下 1、转换编码 str=mbconvertencoding(str=mbconvertencoding(...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。