php pecl 打不开,我的pecl使用不了报连接失败?

博主在尝试使用pecl安装swoole扩展时遇到问题,发现网上常见的解决方案并不适用。通过检查openssl的配置文件openssl.conf,发现了证书路径的错误。博主修复了这些路径,并成功解决了问题,pecl搜索swoole得以顺利完成。
摘要由CSDN通过智能技术生成

就喜欢折腾,捣鼓。

这个问题我在网上看到的很多解释方案都不行,大部分都是说用 openssl_get_cert_locations 打印SSL证书路径。然后检查证书是否存在,不存在就去官方下载一个。

然并我的并没有这么简单。

我的证书目录下有个openssl.conf 文件,打开一看,里面有好多处证书文件的路径拼接。一看很明显有不对的地方:

dir = /etc/pki/CA # Where everything is kept

certs = $dir/certs # Where the issued certs are kept

crl_dir = $dir/crl # Where the issued crl are kept

database = $dir/index.txt # database index file.

#unique_subject = no # Set to 'no' to allow creation of

# several ctificates with same subject.

new_certs_dir = $dir/newcerts # default place for new certs.

certificate = $dir/cacert.pem # The CA certificate

serial = $dir/serial # The current serial number

crlnumber = $dir/crlnumber # the current crl number

# must be commented out to leave a V1 CRL

crl = $dir/crl.pem # The current CRL

private_key = $dir/private/cakey.pem# The private key

RANDFILE = $dir/private/.rand # private random number file

检查上面几个文件路径是否有效,改完保存。

然后试下:

pecl search swoole

成功!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值