PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

解决PHP curl https时error 77(Problem with reading the

原创
2016-06-20 12:46:34 1293浏览

解决PHP curl https时error 77(Problem with reading the SSL CA cert (path? access rights?))

服务器环境为CentOS,php-fpm,使用curl一个https站时失败,打开curl_error,捕获错误:Problem with reading the SSL CA cert (path? access rights?)

解决方案:
1. sudo yum install ca-certificates (无论有没有,安装确认一下)

2. 重启php-fpm,这步比较重要,更改底层的东西时一定要重启一下

3. curl时设置:curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0)


声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。