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

hykeda3个月前PHP488

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高精度计算 * @param string $type * @param $n * ...

file_get_contents("php://input")的使用方法

$data = file_get_contents("php://input"); php://input 是个可以访问请求的原始数据的只读流。 POST 请求的情况下,最好使用 php:/...

PHP限制ip以及IP段是否允许访问,以及对ip子网的理解

php 如何限制ip访问:// 判断ip是否被允许 function isIpBlocked($clientIP,$blockedIPs) {   ...

php导出EXCEL出现错误解决方法

由于数据量不多的增多,最近出现了导出excel的时候报错:Allowed memory size of 134217728 bytes exhausted (tried to allocate 114...

discuzX3.2 用户注册接口代码

新建一个php文件在根目录,例:test.php test.php 具体内容: error_reporting(0); require_once './source/class/clas...

php json_encode输出空白问题

php json_encode输出空白问题

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

发表评论    

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