Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailgun PHP API changed on 1/23/2018 SSL Certificate Error not resolved with new cacert.pem file

My PHP Mailgun interface had been working for 2 years until yesterday 1/23/2018 at about 12 noon central time.

Now all calls to the Mailgun API are returning the SSL certificate problem

Exception 0 [curl] 60: SSL certificate problem: unable to get local issuer certificate [url] https://api.mailgun.net/v2/

Curl also returns the same problem at the command line when attempting to access the mailgun API.

We have downloaded and installed the latest cacert.pem file from https://curl.haxx.se/docs/caextract.html and includeded the path to this file in the php.ini file parameter curl.cainfo = /path/to/cacert.pem and the openssl.cafile = /path/to/cacert.pem

We have restarted our application and rebooted our server but the problem is not fixed.

Is anyone else having the same problem with the PHP Mailgun API ? Is there a way to disable the SSL certificate check through the Mailgun API ?

like image 933
Steve R Avatar asked Jan 24 '18 17:01

Steve R


1 Answers

The SSL Certificate problem with the PHP Mailgun API was resolved by copying the latest cacert.pem file to the following directory : ..PHP\v5.6\vendor\guzzle\guzzle\src\Guzzle\Http\Resources\

Apparently the PHP MailGun API uses this directory for the certificates when calling the guzzle and curl interfaces. Changing the PHP.ini file parameter curl.cainfo = "/path/to/cacert.pem" is not sufficient to resolve this problem.

like image 191
Steve R Avatar answered Nov 16 '22 10:11

Steve R