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

前端 未结 16 2740
时光取名叫无心
时光取名叫无心 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:06

    Finally got this to work!

    1. Download the certificate bundle.

    2. Put it somewhere. In my case, that was c:\wamp\ directory (if you are using Wamp 64 bit then it's c:\wamp64\).

    3. Enable mod_ssl in Apache and php_openssl.dll in php.ini (uncomment them by removing ; at the beginning). But be careful, my problem was that I had two php.ini files and I need to do this in both of them. One is the one you get from your WAMP taskbar icon, and another one is, in my case, in C:\wamp\bin\php\php5.5.12\

    4. Add these lines to your cert in both php.ini files:

      curl.cainfo="C:/wamp/cacert.pem"
      openssl.cafile="C:/wamp/cacert.pem"
      
    5. Restart Wamp services.

提交回复
热议问题