cURL requires CURLOPT_SSL_VERIFYPEER=FALSE

前端 未结 3 1704
温柔的废话
温柔的废话 2020-12-01 08:04

I was using cURL on my localhost for the longest time and all the sudden I noticed it no longer works unless I explictly set the option, CURLOPT_SSL_VERIFYPEER=

3条回答
  •  一个人的身影
    2020-12-01 08:51

    If you are using WampServer, notice this:

    You must put the absolute path in CURLOPT_CAINFO, for example:

    curl_setopt ($ch, CURLOPT_CAINFO, 'C:\wamp\www\your-project\cacert.pem')
    

    Don't use relative path: curl_setopt ($ch, CURLOPT_CAINFO, 'cacert.pem') because it doesn’t work.

提交回复
热议问题