file_get_contents(): SSL operation failed with code 1, Failed to enable crypto

前端 未结 16 2003
情歌与酒
情歌与酒 2020-11-22 04:31

I’ve been trying to access this particular REST service from a PHP page I’ve created on our server. I narrowed the problem down to these two lines. So my PHP page looks li

16条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 04:39

    following below steps will fix this issue,

    1. Download the CA Certificate from this link: https://curl.haxx.se/ca/cacert.pem
    2. Find and open php.ini
    3. Look for curl.cainfo and paste the absolute path where you have download the Certificate. curl.cainfo ="C:\wamp\htdocs\cert\cacert.pem"
    4. Restart WAMP/XAMPP (apache server).
    5. It works!

    hope that helps !!

提交回复
热议问题