Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
fgmSame 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.
Comment #2
fgmAs 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.
Comment #3
lvthunder CreditAttribution: lvthunder commentedThat 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.
Comment #4
davidjmcq CreditAttribution: davidjmcq commentedThanks 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
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
Comment #5
sincronista CreditAttribution: sincronista commentedThanks 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!!
Comment #6
mdubnz CreditAttribution: mdubnz commentedI 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 :)
Comment #7
cotillardq CreditAttribution: cotillardq commentedmdubnz
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.
Comment #8
sadashiv CreditAttribution: sadashiv commentedI 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.
Comment #9
super-T CreditAttribution: super-T commented@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
Comment #10
ruscoe CreditAttribution: ruscoe commented@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'slibraries
directory.You'll need the Libraries module installed.
If it doesn't already exist, you can create a new directory named
libraries
in thesites/all
directory, found in the root of your Drupal installation. Inside that directory is where you create themailchimp
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.
Comment #11
iAugur CreditAttribution: iAugur commentedIn 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.
Comment #12
epavlov CreditAttribution: epavlov commented@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.
Comment #13
grinxols CreditAttribution: grinxols commented#11 #12 worked for me, thanks!
Comment #14
Tashko CreditAttribution: Tashko commentedThis 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.