Mailgun PHP API changed to SSL certificate 1/23/2018 Error not resolved with the new cacert.pem file

The PHP Mailgun interface worked for 2 years until yesterday 1/23/2018 at about 12 hours central time.

Now all calls to the Mailgun API return an SSL certificate issue

Exception 0 [curl] 60: SSL certificate problem: local issuer certificate cannot be obtained [url] https://api.mailgun.net/v2/

Curl also returns the same issue on the command line when trying to access the mailgun API.

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

We restarted our application and rebooted our server, but the problem persists.

Does anyone else have the same issue with the PHP Mailgun API? Is there a way to disable SSL certificate verification through the Mailgun API?

+4
source share
6 answers

The SSL certificate issue with the PHP Mailgun API was resolved by copying the last cacert.pem file to the following directory: ..PHP \ v5.6 \ vendor \ eat \ eat \ SRC \ eat \ Http \ Resources \

Apparently, the PHP MailGun API uses this directory for certificates when invoking the wzzle and curl interfaces. Changing the PHP.ini file parameter curl.cainfo = "/path/to/cacert.pem" is not enough to solve this problem.

+7
source

, ? .

0

, , . Laravel 4.2, Guzzle 4.x Mailgun, , 1/23 .

cacert.pem, /vendor/guzzlehttp, , .

0

php/curl , .

, :

sudo apt-get update && sudo apt-get upgrade
0

... "pem" : //SRC//Http/Resources/

You need to get de cacert.pem here ... latest version: https://curl.haxx.se/docs/caextract.html

And after that, just change your folder.

0
source

Actually, this is not a mistake; this is for security reasons. To make it work, change

$sslEnabled = true

to

$sslEnabled = false

You can read more information on this github issue .

0
source

Source: https://habr.com/ru/post/1692655/


All Articles