Support » Plugin: MC4WP: Mailchimp for WordPress » Error connecting to MailChimp: SSL certificate problem:

  • Resolved GazHyde

    (@gazhyde)


    Free Weight Loss Book

    When filling out the subscription form the following message is displayed. “Oops. Something went wrong. Please try again later.

    When I look in the “MailChimp for WordPress” page in the admin it displays the following message.

    Error connecting to MailChimp: SSL certificate problem: unable to get local issuer certificate. Read more about common connectivity issues.

    Looking in the MailChimp dashboard at the list this adds to I can see that various people have been added already today up till about 8am (GMT)

    I upgraded the site to WP4.4 around 10am this morning, and I’m wondering if this has caused the problem?

    https://wordpress.org/plugins/mailchimp-for-wp/

Viewing 15 replies - 1 through 15 (of 28 total)
  • This is happening to me as well.

    3.06 did not resolve.
    Server Info:

    Server Apache/2.4.12 (Win32) OpenSSL/1.0.1l
    PHP v5.6.8
    MYSQL v5.6.24
    cURL Information 7.40.0

    This site is not ssl (no cert), but never was and everything worked until the WP 4.4 upgrade.

    Perhaps helpful info, this is a Windows 10 machine running XAMPP (I actually have 2 machines with this problem, both are windows/xampp). I have completed the upgrade on several flavors of Linux and they all went just fine.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hey all,

    Do you happen to know which versions of PHP CURL you’re all running? Most likely, asking your host to update it to a more recent version will get rid of the issue automagically.

    Alternatively, add the following code to your site as a (temporary) workaround.

    add_filter( 'http_request_args', function( $args, $url ) {
    	// only act on requests to api.mailchimp.com
    	if( strpos( $url, 'api.mailchimp.com' ) === false ) {
    		return $args;
    	}
    
    	$args['sslverify'] = false;
    	return $args;
    }, 10, 2 );

    You can add this code to your theme its functions.php file or by putting it into a file of its own in the /wp-content/plugins/ folder with the proper plugin headers.

    Hope that helps. If not, let me know!

    PS. version 3.0.6 was meant to tackle this issue but apparently we’re still targeting the wrong CURL versions in the code, so if you could let me know which CURL versions you’re running then that would be SUPER helpful.

    PHP Curl 7.36

    Thanks for the update – I suppose wait for the WP fix..

    PHP Curl 7.38

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hey all,

    I’ve filed a bug report on WP Trac about this change but can’t guarantee it’ll get any priority as it only seems to be affecting a very small subset of sites out there. It seems to be that only certain versions of OpenSSL / PHP CURL are affected, although I am not yet entirely sure.

    Until then, the following code will disable SSL verification for the requests to MailChimp and thus get rid of this error for now.

    add_filter( 'http_request_args', function( $args, $url ) {
    	// only act on requests to api.mailchimp.com
    	if( strpos( $url, 'api.mailchimp.com' ) === false ) {
    		return $args;
    	}
    
    	$args['sslverify'] = false;
    	return $args;
    }, 10, 2 );

    I am also having this issue. Adding the code to functions.php resulted in a 500 error.

    Check where you added the filter code to be sure it is not inside of another argument, or paste it as the very first / very last thing in the file – I suspect that is why you are getting a 500 now.

    The code does provide a viable solution for the time being, and worked fine on my machines.

    I’m having the same issue. I have been in touch with my host who said:

    “On our servers the following version of cURL is installed 7.37.1 and 7.38.0. As I see requests to https://*.api.mailchimp.com/ are not blocked as well.”

    When I install the code above this solves the issue (but isn’t ideal).

    OK, thanks, not sure what the difference is but I tried again and it worked, thanks!

    I’m having the same issue after upgrading WP to 4.4

    The code for function.php (above) works for me – thanks a bunch for that!

    For what it’s worth:
    server: Linux hosting with cPanel (godly hosting)
    PHP: 5.5
    cURL: 7.19.7
    OpenSSL: 1.0.1e

    Thanks for the support!

    Plugin Author Danny van Kooten

    (@dvankooten)

    Thank you Scamyre, appreciate the details! That OpenSSL bit is the important part, I think. 🙂

    I’ve had the same problem and even tried adding the cacert.pem file to my php installation folder and calling it via php.ini @ curl.cainfo = “/usr/local/lib/php/cacert.pem” without any luck

    Stats:
    PHP 5.6.16
    cURL 7.38.0

    Used the temp fix disabling the ssl for mailchimp posted to make it work for now.

    Thanks for following up on this Danny! Hopefully a fix is around the corner

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Error connecting to MailChimp: SSL certificate problem:’ is closed to new replies.