curl请求https域名正常但是程序调用PHP5.2请求https域名发生500

环境:CentOS6.4、PHP5.2

当使用curl调用https域名的时候,访问是没问题的(curl需要安装https模块),但是通过程序调用的时候,会发生500或者502现象,调用代码:

curl_setopt($ch, CURLOPT_URL, 'https://www.baidu.com');

于是在网上参考了一段文章https://blog.csdn.net/loophome/article/details/53812887

虽然我的内核日志和gdb记录没有出现libsqllite报错,但是通过其解决方法:

删除/etc/pki/nssdb/pkcs11.txt 和 /etc/pki/nssdb/cert9.db这两个文件也实践解决了此问题,可能centos的这个bug涉及面很广

在Centos的bug列表中,能够找到关于这个bug的说明:

https://bugs.centos.org/view.php?id=7399

https://www.mankier.com/5/cert9.db

posted @ 2018-11-23 11:34  ldayang  阅读(738)  评论(0)    收藏  举报