林中侠客

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

服务器环境为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)

posted on 2015-08-21 10:54  林中侠客  阅读(5555)  评论(2编辑  收藏  举报