在使用tp框架对接阿里云物联网平台的云端SDK时,在本地发送消息报以下的错误

cURL error 60: SSL certificate problem: unable to get local issuer certificate(see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://iot.cn-shanghai. aliyuncs.com/?IotInstanceId=iot-qqqqq&ProductKey=iqqq&Qos=1&TopicFul1Name=%2qqq%qqqqq%2Fuser%2Fpp

解决方案为下载证书到对应PHP版本下的extras\ssl文件夹下,并修改php.ini文件,重启Apache

1)从https://curl.haxx.se/ca/cacert.pem下载最新的cacert.pem

2)将以下行添加到php.ini(如果这是共享托管,并且您无法访问php.ini,那么可以在public_html中添加到.user.ini)

curl.cainfo=/path/to/downloaded/cacert.pem

这个错误只在windows环境下出现,ios系统未出现这个问题

参考链接:curl: (60) SSL certificate problem: unable to get local issuer certificate 错误_zhangfeng1133的博客-CSDN博客

相关链接

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: