I'm not sure if this is a bug or not, but I keep getting the "Failed to load MailChimp PHP library. Please refer to the installation requirements." even though the file is there. It works on a site I have on a different server. The only thing is I don't have the real URL pointed to this new site yet so my site is in a folder IE http://gator3011.hostgator.com/~nvcc

Does anyone have any ideas I can try?

Comments

fgm’s picture

Same problem here: I have the suggested library layout:

sites/all/libraries/mailchimp/MCAPI.class.php
sites/all/libraries/mailchimp/README

But I get the exact same message as above. Looking into it.

fgm’s picture

As often in Drupal: a cache flush fixed it. Apparently this is because the libraries cache is not flushed during install, so it needs to be flushed manually to force libraries to rescan its folder and find the MC library.

lvthunder’s picture

That was it fgm. Maybe the error message should be changed to "Failed to load MailChimp PHP library. Please refer to the installation requirements. If you think this is in error flush the cache." with a link to flush the cache.

davidjmcq’s picture

Thanks guys... finally found the problem from here.

Just to confirm..... it took me well over an hour to figure out this. I found the README misleading, at least in the Drupal context. It might be OK for other contexts.

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

sincronista’s picture

Thanks a lot davidjmcq

1) I created the direcory called mailchimp in sites/all/libraries

2) added two files in it:
MCAPI.class.php
README

3) cleader cache

and worked!!

mdubnz’s picture

I have Drupal 7.24 and trying to install the latest version of MailChimp, but alas I can't get the MCAPI library recognised and keep getting the error message "Failed to load MailChimp PHP library. Please refer to the installation requirements."

Under sites/all/libraries I have the mailchimp folder with MCAPI.class.php and README files and a folder called examples. I've tried uninstalling and reinstalling the MailChimp modules and flushing all caches. At a loss as to what to do now..

File permissions are currently:
libraries folder: rwx r-x r-x
mailchimp folder: rwx rwx r-x
MCAPI.class.php: rw- r-- r--
README: rw- r-- r--

Any help appreciated :)

cotillardq’s picture

mdubnz

The 3.x release uses a new version of the MailChimp API library (2.0). If you are upgrading from 7.x-2.x, make sure to get the new version of the library.
Use this library https://bitbucket.org/mailchimp/mailchimp-api-php fore version

The documentation was outdated.

sadashiv’s picture

I also faced a issue while using other module which got fixed after clearing cache i.e. library was not loaded even after extracting but detects after flushing cache.

I raised a issue at https://www.drupal.org/node/2341955

Hth,
Sadashiv.

super-T’s picture

@fgf can you please tell me how you created this directory in novice terms?

Im experiencing the same problem and have been at it for a few days now...thanks

ruscoe’s picture

Status: Active » Closed (works as designed)

@super-T If you haven't yet, take a look at the installation notes. What you need to do is download the latest Mailchimp library archive and extract it's contents to a directory named mailchimp in your Drupal site's libraries directory.

You'll need the Libraries module installed.

If it doesn't already exist, you can create a new directory named libraries in the sites/all directory, found in the root of your Drupal installation. Inside that directory is where you create the mailchimp directory and extract the library files. As others have mentioned, you'll need to clear your site's cache after doing that.

How you create the directories depends on how you're accessing your web server and I won't be able to give a specific answer without knowing if you're using FTP, have shell access or something else. Please feel free to reopen this ticket if you're still having a problem and I'll be happy to help.

iAugur’s picture

In case it helps anyone - I had the same issue and it was a missing composer.json file in the root of the mailchimp libraries folder (I had .json files ignored in my .gitignore).
The hook_libraries_info() (mailchimp_libraries_info()) uses this file to get the version for checking the library is present.

epavlov’s picture

@iAugur it's 2018 and this is saved my day. Mailchimp v3 API is still missing composer file. Adding it from source files makes an error disappear.

grinxols’s picture

#11 #12 worked for me, thanks!

Tashko’s picture

This is yet another example of why I am migrating all my sites to wordpress.
Seriously. How f**king arcane is this.

in comparison. The mailchimp wordpress plugin is one click to install and works within minutes automatically segmenting audiences.

Drupal is a scam.