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

前端 未结 16 2812
时光取名叫无心
时光取名叫无心 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条回答
  •  猫巷女王i
    2020-11-21 08:21

    elaborating on the above answers for server deployment.

    $hostname = gethostname();
    if($hostname=="mydevpc")
    {
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    }
    

    should do the trick for development environment without compromising the server when deployed.

提交回复
热议问题