解決PHP curl https時error 77(Problem with reading the

解決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?)php

解決方案:
1. sudo yum install ca-certificates (不管有沒有,安裝確認一下)服務器

2. 重啓php-fpm,這步比較重要,更改底層的東西時必定要重啓一下curl

3. curl時設置:curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0)php-fpm

相關文章
相關標籤/搜索