Hi,

I have Mailchimp version 7.x-2.12 installed as well as Libraries 7.x-2.1 as well as the Mailchimp API as told in the README.TXT
Then I configured my API key.
When I look at my status report it says the Mailchimp API is at version 1.3 and the MailChimp MCAPI wrapper library is installed correctly.

So far so good.
So I enabled Mailchimp lists. Went to configure the lists.
It says that don't have any lists.

You don't have any lists configured in your MailChimp account, (or you haven't configured your API key correctly on the Global Settings tab). Head over to MailChimp and create some lists, then come back here and click "Refresh lists from MailChimp!"

However I did enter one list in Mailchimp.

So I went to the "Refresh lists from Mailchimp" link.

Mailchimp Lists refreshed

It does however displays this immediately. So quickly that I doubt it actually went to Mailchimp.
But well, when I go back to the lists configuration it says:

Failed to load MailChimp PHP library. Please refer to the installation requirements.

I have read the installation instructions a bunch of times, and I think I did everything that was said in there.
However I noticed that the instructions are not entirely correct or I misinterpreted something:
Select "API keys and Authorized Apps" from the Account dropdown menu.
But I cannot fond that in Mailchimp. All I can find is a "API Keys" section in the Extras dropdown on my account page.

What should I do now?

Thanks in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gcb’s picture

Status: Active » Postponed (maintainer needs more info)

Refresh lists just clears the cache so that they will be refreshed the next time they are needed.

API keys sounds fine: it's just a change in the mailchimp UI. We'll need to update the documentation.

Try clearing cache and double-check the mailchimp API configuration. That message pops up when this function call comes up empty:

$library = libraries_load('mailchimp');

Noe_’s picture

This is amazing !

And didn't I think of clearing the cache?
Well it works now :D

Thanks.

gcb’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
randell’s picture

Issue tags: +mailchimp

When you said clearing the cache, did you mean going to Configuration > Performance > Clear Cache > Clear All Caches? If yes, it didn't solve the problem for me.

wwwprola’s picture

I had an identical problem. Showed up properly installed in status, but couldn't find the library on the list page. In my case, I have redis caching installed. Flushing the redis db worked for me.

dzinergal’s picture

I'm having the same issue - I've checked that I have libraries 2.2 installed and have double checked the API code. Still not able to link to list and getting the php error:

" Failed to load MailChimp PHP library. Please refer to the installation requirements."

Any help would be greatly appreciated. Thanks

dzinergal’s picture

Status: Closed (works as designed) » Active
sincronista’s picture

I found mi solution here

from http://apidocs.mailchimp.com/api/downloads/mailchimp-api-class.zip
only two files are actually required to make things work:

MCAPI.class.php
README

I had installed Libraries module correctly, but nothing said which libraries directory to put these files in. It turned out the library directory required didn't exist so I had to do

# mkdir -p sites/all/libraries/mailchimp/
# chown -R www-data:www-data sites/all/libraries

No big deal once you know - but over an hour to track it down. It's not written anywhere.

Then I cleared cache

Admin >> Configuration >> Development >> Performance >> Clear Cache

dzinergal’s picture

#8 worked for me

Thanks sincronista!

mouse77e’s picture

Failed to load MailChimp PHP library. Please refer to the installation requirements.

I think I will pop if I see this once more ;~(

I have two sites waiting to go to clients and neither of them have a working Mailchimp mailing list sign up due to this error...
Both have the Libraries (2.2) module installed, Both libraries are in,
> ALL
> > Libraries
> > > Mailchimp
> > > > MCAPI.class.php
> > > >README

Out of interest one has an API Key from Mailchimp in place, the other doesn't - yet both are reporting the same error...

Other libraries on the sites are working.

I am now going to a small dark room to lie down untill I can find an answer!

phelix’s picture

removing crappy comment.

gcb’s picture

Status: Active » Closed (works as designed)

mouse77e: you need the libraries version 1.3 if you are using Mailchimp 7.x-2.12 (which is implied by you posting on this issue).

phelix, please confirm you have the proper library version for your Mailchimp version.

Mailchimp module 7.x-2.x = mailchimp library 1.3
Mailchimp module 7.x-3.x = mailchimp library 2.04

phelix’s picture

I need this version. Mailchimp module 7.x-3.x = mailchimp library 2.04

But I can not find it anywhere.. I can find the version that needs compiled with composer but I am on pantheon and don't have shell access so I can't compile it. I need to find a downloadable version of the 2.04 library that is ready to go. where can I find this??

phelix’s picture

I need this version. Mailchimp module 7.x-3.x = mailchimp library 2.04

But I can not find it anywhere.. I can find the version that needs compiled with composer but I am on pantheon and don't have shell access so I can't compile it. I need to find a downloadable version of the 2.04 library that is ready to go. where can I find this??

gcb’s picture

There is a link in the README file, or you can google "Mailchimp API library" to get the download.

Here is the link from the README file:
https://bitbucket.org/mailchimp/mailchimp-api-php/get/2.0.4.zip

If you are looking for the 1.3 version, it's also in the README file and the .make.example file from the 2.x module.

Compiling is not necessary. Simply download the zip and unzip it in libraries/mailchimp.

temkin’s picture

It took me a while to figure it out as well. Although I must admit it was explained in the README file. Here is what I did:

cd sites/all/libraries
wget https://bitbucket.org/mailchimp/mailchimp-api-php/get/2.0.5.zip
unzip 2.0.5.zip
mv mailchimp-mailchimp-api-php-a884ee03dd28/ mailchimp
chown -R www-data:www-data mailchimp

After that it works just fine.

Anonymous’s picture

Thanks artem.kolotilkin, #16 worked for me (after clearing the cache).

marco71’s picture

Me I have problems... :-( Checked versions of all
I got the latest of all.... Also got the correct lib. Installed as artem.kolotilkin mentioned.
Cleared cache... 20 times.

Also checked access for my apache user www-data. Seems fine.

I don't get it. Any other suggestions?

Drupal version 7.28
MailChimp Module 7.x-3.1
MailChimp Api 2.05
located at: /var/www/her/sites/all/libraries /mailchimp/mailchimp-api-php/src/Mailchimp.php
I also tried: /var/www/her/sites/all/libraries /mailchimp/mailchimp-mailchimp-api-php-a884ee03dd28/src/Mailchimp.php

I am having doubts about where the module is looking for the library.

Sorry no php expert otherwise I would try and debug it. Not that there is a bug.... I am confused.

Should I use 2.04 or is 2.05 OK to use? Maybe untested against 2.05?

marco71’s picture

Would like to reopen this issue but for the latest version.
I tried all suggested solutions but doesn't want to load the library

gcb’s picture

I have only tested against 2.0.4, as noted in the readme. Do you have any other modules using libraries? Are you sure you have the "Libraries" module installed and enabled?

marco71’s picture

Hi gcb,

Ah ok, I will see if I can download that version and try it.
Sorry for missing that 2.05 wasn't tested.

Libraries is installed properly. At least it doesn't show any errors.

I will test some other module to see if libraries is working properly.

I will let you know. Tnx for the reply.

marco71’s picture

I am uninstalling libraries :-( to see if this might be the problem.
Seems another module (ColorBox) also has trouble finding Libraries.

When uninstalling I did see this come by.

Notice: Use of undefined constant MAILCHIMP_QUEUE_CRON - assumed 'MAILCHIMP_QUEUE_CRON' in mailchimp_uninstall() (line 72 of /var/www/her/sites/all/modules/mailchimp/mailchimp.install).
    Notice: Use of undefined constant MAILCHIMP_BATCH_QUEUE_CRON - assumed 'MAILCHIMP_BATCH_QUEUE_CRON' in mailchimp_uninstall() (line 74 of /var/www/her/sites/all/modules/mailchimp/mailchimp.install).

After uninstalling Libraries and trying to install again with 2.04 Mailchimp Api Still No Luck :-(

I tried to install on a fully functioning website. On this site I have colorbox working and that uses Libraries as well.
That site shows me a different error msg saying Error

MailChimp not detected
The version of the MailChimp MCAPI library could not be detected.

Which is different from

MailChimp not found
The MailChimp MCAPI library could not be found.

On all the sites I tested the Permissions have been set recursively to 755 and owned by www-data (my apache user)

Might it have to do with core update 7.28?

artofeclipse’s picture

After investigating I found the right library link to download "its writen in README.txt" https://bitbucket.org/mailchimp/mailchimp-api-php/downloads, the problem is in the documention page, it have the wrong download link .... this is solved mine issue. hope it help someone.

scott.browne’s picture

#18 Thanks for posting the library structure.

The readme doesn't tell you the naming of the library or the structure from what I can see. You provided that for me. I wasn't entirely sure if it's just mailchimp, or mail chimp api etc.

jonbim’s picture

#16 worked for me too - thanks artem.kolotilkin

angus_muir’s picture

Link under #23 worked for me. Thanks artofeclipse

twmcardle’s picture

Hi, I have read all of the posts and have followed everything you guys have posted ref loading Mailchimp. But I still cannot load the mailchimp module. I am also getting similar messages when trying to update modules and themes. I am assuming this is a server issue, but cannot figure it out. I am very new to drupal and working with databases, so would appreciate any help to resolve.

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: http://www.pennymills.com/authorize.php?batch=1&render=overlay&id=110&op=do StatusText: Service unavailable (with message) ResponseText: UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/linweb34/p/pennymills.com/user/htdocs/C:/xampp/tmp/update-extraction-27db74ec/mailchimp): failed to open dir: No such file or directory in RecursiveDirectoryIterator->__construct() (line 408 of /home/linweb34/p/pennymills.com/user/htdocs/includes/filetransfer/filetransfer.inc).

Many thanks

Tom

mariocantor’s picture

#15 works for me...

ledom’s picture

Link under #23 worked for me. Thanks artofeclipse and angus_muir

alt2’s picture

I'm baffled probably by the same problem marco71 7 months ago.

I have MailChimp Module 7.x-3.2 & MailChimp Api 2.04 plus the Libraries module.

I think I'm confused between the varying sets of instructions. There is no longer a file called mcapi.class.php right?

What's the directory path down and the name of the expected php file? --> sites/all/libraries/mailchip/ ?what?

Thanks very much for any help!

gcb’s picture

The most updated info should be in the readme for 3.2. The first PHP file you'll see if you have it set right is sites/all/libraries/mailchimp/src/Mailchimp.php

tsaks’s picture

#23 link worked. Thanks!

divcg’s picture

I have just spent an hour trying to resolve this error to no avail. All of the files are where they are supposed to be. I tried all the links listed in this report. All the permissions are correct. All the files exist as expected and specified int he README file. Every module is up to date. NOTHING WORKS!

How do you fix this problem? And why is this so difficult (I have about 10 other libraries that have absolutely no problem and not this difficult to install) Why is there no actual error message on WHY it can not load the module that is definitely there?

edit: yikes, that was horrid. One readme with the module says one thing, forum says another, code has yet another. The mailchimp.module has download URL of https://bitbucket.org/mailchimp/mailchimp-api-php/get/2.0.4.zip, so #16 above does work

mark_schaal’s picture

Something I found out today: I had originally made the same mistake everyone else had mentioned and installed the incorrect library. After the error message appeared, I resolved the library vesion issue by using the updated module's README links; however, what I found was that while the Status Report page would indicate the correct version was installed, Drupal held on to the system error indicating the library was improperly configured. After verifying the library version about....thirty times, I went ahead and did a complete disable/uninstall/reinstall with the original library that had shown up in the Status Report as properly configured. Voila! Worked like a charm.

So when in doubt....verify that library against the README and do a fresh install of the module.

capfive’s picture

Well guess i need to just read the readme better! went for the wrong version library!

phanosd’s picture

3 things to make sure you install + 2 to get up and running for mailchimp

1) Make sure you have Libraries API (Standalone Drupal Module) installed
2) Read the documentation for the module per say:

Download and install the Mailchimp module.
Download the MailChimp API library v2 and extract it to the libraries folder. this is found here -- https://bitbucket.org/mailchimp/mailchimp-api-php/get/2.0.4.zip (at the time of comment)
Rename the extracted folder to "mailchimp" so that the API library can be found within sites/all/libraries/mailchimp. If you haven't already created the libraries folder, you have to install the Libraries API module and create the libraries directory.
(Versions 7.x-2.x and higher)

The 2.x release uses the old version of the MailChimp API library. Make sure you have the correct v1 library with the Mailchimp module linked below.

Download and install the Mailchimp module.
Download the MailChimp API library v1 and extract it to the libraries folder.
Rename the extracted folder to "mailchimp" so that the API library can be found within sites/all/libraries/mailchimp. If you haven't already created the libraries folder, you have to install the Libraries API module and create the libraries directory.

3) Make sure your sites>all>libraries>mailchimp is readable by your server
4) Drush cc all / clear your cache via Drupal panel
5) Make sure you login into your mailchimp account and create an API key - or follow this link https://us9.admin.mailchimp.com/account/api/

You are good to go

CountPacMan’s picture

Ballerup Bibliotek’s picture

Old thread but got a small variation of the problem.

I am working at a public library in Denmark and we use MailChimp for newsletters.

I don't have access to the directories so can't upload anything that isn't a module.

Any way I can get it to work?

Thanks in advance.

gcb’s picture

You need the Library installed in the Libraries folder to make this work. It's possible you could hack the module to look for the libraries somewhere else, but I wouldn't recommend it.

Not having access to upload a Library to your Drupal site is a breaking limitation, I'm afraid. You should speak to the powers that be about it: using the Libraries folder is essentially the same as using the modules folder: both are used to add functionality to your site.

Ballerup Bibliotek’s picture

Thanks gcb.

I got a huge task ahead of me then :)

AlbionBrown’s picture

FileSize
619 bytes

I think I found a bug in the Libraries API module's logic after receiving the same error messages. I found that in 7.x-2.4 in libraries.module on line 106, it checks 2 vars $profile and $config. If either evaluates to false, it returns an empty array. In the comments above this block, it states:

// $config and $profile should never be empty in a proper Drupal setup.
// However, we should never search into the root filesystem under any
// circumstances, so just bail out in that case.

So keeping in mind it says "$config and $profile should never be empty...", I changed the or statement to an and statement.

lubwn’s picture

Okay, so all I needed to do was run the following command from terminal:

sudo chown -R www-data:www-data /var/www/clients/client1/web16/web

where the route at the end of command is where your website is. It basicly sets owner of all the files as www-data user. Then error message dissapeared for me. Maybe it will help someone.