Blog

Check the latest news and trends

CMC Mailchimp Could not connect (ERR : )

Written by 
CMC Mailchimp Could not connect (ERR : )

I've installed CMC from Compojoom on a client website a couple of days ago and I had a big problem with it and after searching on Google I've seen that many others had the same problem.

First let me tell you what CMC is?

At this date CMC is in my opinion the best Joomla extension to integrate MailChimp with your Joomla website.

With CMC from Compojoom you can connect your Mailchimp account to your Joomla website and let user subscribe to your newsletter list hosted on Mailchimp servers.

The problem

The problem was that every time I've tried to add a new user via the subscription module, I've got the same error again and again and this error was: Could not connect (ERR : ).

After trying to find solutions to my problems I've seen that the problem could be related to a PHP function called fsockopen.

Unfortunately it was, because this function was disabled on the client server by his host. All I have to do is enable it from CPanel. Soon as I did that CMC started to communicate correctly with the Mailchimp account.

How to detect if the "fsockopen" function is enabled on your server?

Connect to your server with you code editor and create a file called "test-function.php" on your server root. Open the file inside your code editor and add the following code:

	<?php
		if(function_exists('fsockopen')) {
		echo "fsockopen function is enabled";
		}
		else {
		echo "fsockopen is not enabled";
		}
	?>

Now open your browser and type http://yourdomainname.com/test-function.php

If you get displayed this message: "fsockopen function is enabled", it means that the problem is related to something else and not to the "fsockopen" function being disabled.

If you get the message: "fsockopen is not enabled" it means that the problem it could be related to the "fsockopen" function being disabled.

Don't forget after testing to delete this file from your server root.

The fix or how to enable the "fsockopen" function in CPanel?

Login to your CPanel and look for an icon that says "Select PHP version" and click on it:

CMC Mailchimp Could not connect (ERR : )

Now inside look for the "Show PHP settings" or "Change PHP settings" or "Switch to PHP settings" and click on it. In my client case is "Switch to PHP settings".

CMC Mailchimp Could not connect (ERR : )

Once inside look for "disable_functions" line and normally you should have either a long or a short line of functions which are disabled on your server. Click on this line of functions and you should get an input box like in the following image:

CMC Mailchimp Could not connect (ERR : )

Look for the "fsockopen" function and remove it from the list. Be sure that you remove only this function, leaving the other ones as they are. After you've removed the function click on the "Apply" button to change your settings.

That's it! Now CMC should communicate properly with the Mailchimp server and your newsletter list should synchronize in your CMC component back-end.

Read 4370 times

Poll

What type of templates would you prefer?

Niche specific - 38.9%
Multiporpuse - 61.1%

Total votes: 18
The voting for this poll has ended on: January 1, 2020

Testimonials

  • I am a director for www.bluereliance.co.uk. Costas has helped us a few times with websites. He always does a Superb job, cant fault anything he does. I wish he lived in the UK so we could hire him full time and lock him in the office. Costas did it again, fantastic, finished off a website for us where our last developer left us stranded. We are very please with the work Costas has done for us and have already hired him for the 3rd time now. Thanks again Costas !! ;-)
    Mandeep Dalvair www.bluereliance.co.uk
    United Kingdom
  • 1
  • 2
  • 3