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

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

    Disclaimer: This code makes your server insecure.

    I had the same problem in Mandrill.php file after line number 65 where it says $this->ch = curl_init();

    Add following two lines:

    curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
    

    This solved my problem and also sent email using localhost but I suggest to NOT use it on live version live. On your live server the code should work without this code.

提交回复
热议问题