PHP - SSL certificate error: unable to get local issuer certificate

前端 未结 16 2733
时光取名叫无心
时光取名叫无心 2020-11-21 07:49

I\'m running PHP Version 5.6.3 as part of XAMPP on Windows 7.

When I try to use the Mandrill API, I\'m getting the following error:

Uncaught e

16条回答
  •  醉话见心
    2020-11-21 08:12

    The above steps, though helpful, didnt work for me on Windows 8. I don't know the co-relation, but the below steps worked. Basically a change in the cacert.pem file. Hope this helps someone.

    • Download cacert.pem file from here: http://curl.haxx.se/docs/caextract.html
    • Save the file in your PHP installation folder. (eg: If using xampp – save it in c:\Installation_Dir\xampp\php\cacert.pem).
    • Open your php.ini file and add these lines:
    • curl.cainfo=”C:\Installation_Dir\xampp\php\cacert.pem” openssl.cafile=”C:\Installation_Dir\xampp\php\cacert.pem”
    • Restart your Apache server and that should fix it (Simply stop and start the services as needed).

提交回复
热议问题