解决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)

 

0 个评论

要回复文章请先登录注册