Issue Summary
How do I install Mailchimp PHP Library on Local? I don’t want to use Wordpress Mailchimp plug-in.
System Details
-
Local v 5.9.0+4961
-
Windows 10
How do I install Mailchimp PHP Library on Local? I don’t want to use Wordpress Mailchimp plug-in.
Local v 5.9.0+4961
Windows 10
Using MailChimp PHP Library with Local by Flywheel -
Solve CURL error 60 when using MailChimp PHP Library with Local by Flywheel
Install MailChimp’s PHP Library using Composer command from the Local Site Shell provided with Local by Flywheel
C:[path to]\Local Sites[site name]\app\public> composer require mailchimp/marketing
The following MailChimp PHP is used to test connectivity between your PHP program and MailChimp (https://mailchimp.com/developer/guides/marketing-api-quick-start/)
GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in C: [path to]\Local Sites[site name]\app\public\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 201
CURLE_PEER_FAILED_VERIFICATION (60)
The remote server’s SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.
To solve this problem, the Local by Flywheel environment needs to be configured correctly.
Download the latest cacert.pem file from https://curl.haxx.se/docs/caextract.html
Copy the cacert.pem file to the “[path to]\Local Sites[site name]\conf\php” directory
Edit the “[path to]\Local Sites[site name]\conf\php\php.ini.hbs” file by adding the following line to the ;Other section of php.ini.hbs file:
curl.cainfo=“C:[path to]\Local Sites[site name]\conf\php\cacert.pem”
NOTE: Making these changes to the php.ini file directly will not work. They must be made to the php.ini.hbs file.
Stop and restart Local by Flywheel
Execute script again and you should get the result:
stdClass Object ( [health_status] => Everything’s Chimpy! )
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.