HI, I have a problem. I can't install libraries guzzle in my website, I don't use drush or ssh.
I can only upload file in my server.
How can i install correctly mailchimp?
Thanks

Comments

mattyy21 created an issue. See original summary.

scotwith1t’s picture

From what I understand, you won't be able to use this module without some help. If you're using shared hosting, you'll need to get someone to log in and install composer if it's not already installed and run 'composer install' from the mailchimp libraries folder.

Ryanm81’s picture

This seems a bit overkill, however I must admit I am not sure about the exact advantages that using Composer to integrate the API compared to the old libraries method offers.

My client uses shared hosting and I have already contacted the host in regards to installing and running Composer however they say it can't be done on their shared server.

Does anyone have any alternative methods for getting this module up and running on a shared server?

Greg Boggs’s picture

Composer install should be run on your local machine and the results should be uploaded to shared hosting. Composer should not be run on a server.

Composer install is needed because the library depends on several PHP dependencies. If we bundle those in, then we would have to maintain releases for them. Also, we'd be breaking the license requirements for Drupal.org modules because Drupal requires a very old free software license.

destinationsound’s picture

here's what i did and got it working. I installed the composer software on my mac OSX using the Terminal app.

1. install composer module using terminal by pasting this code found here: https://getcomposer.org/download/

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

2. run this next line of code to add the missing folder directory where composer.phar will eventually be renamed and moved to:

sudo mkdir -p -m 775 /usr/local/bin
export PATH=$PATH:/usr/local/bin

3. then execute below code which will move composer.phar to correct location so commands will work (/usr/local/bin):

mv composer.phar /usr/local/bin/composer

4. running composer can now be done by just typing into terminal:

composer

5. navigate to the folder you wish to run the composer file. In this example it was mailchimp located in my downloads folder
5.a first find the folder

cd /users/destinationsound/downloads/mailchimp

You should see the text to the left of bouncing cursor say mailchimp

5b. to run and install the composer file type

composer install

It will start unpacking and downloading everything.

After all is said and done the mailchimp library folder will be about 1,500 files to upload.

*****I m not an expert on this but this is what i figured out by googling******

Hope it helps!

dalemoore’s picture

Your steps worked installing Composer and uploading the dependencies, thanks for the detailed steps! You may need to clear cache after, I did.

Beezer75’s picture

I'm on a shared host. I already have a site set up that uses the mailchimp module version 7.x-2.13 and I need to upgrade. Is there a way I can simply download the required Composer and Guzzle libraries and FTP them to my server? Many thanks for any help.

ruscoe’s picture

Status: Active » Fixed

@Beezer75 We now have a library package that includes all the dependencies, so you don't need to run Composer. You can download it here:

https://github.com/thinkshout/mailchimp-api-php/releases/tag/v1.0.4

Direct link: https://github.com/thinkshout/mailchimp-api-php/releases/download/v1.0.4...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

scuba_fly’s picture

Just if someone sees this post.
The (now) composer.json says:
version >=1.0.5

So I guess you should not download the 1.0.4 version but the 1.0.5 version:

https://github.com/thinkshout/mailchimp-api-php/releases/tag/v1.0.5

Or better check the composer.json file for which version you need and/or download the latest 1.0.x release.

manoloka’s picture

Hi Ruscoe,

So, what are instructions to install that package without running Composer.

Because the Readme.txt for that package still reads:

## Requirements

- PHP 5.5.0 or greater
- [Composer](https://getcomposer.org/)
- [Guzzle](https://github.com/guzzle/guzzle)

## Installation

Dependencies are managed by [Composer](https://getcomposer.org/). 

... because I'm a bit confused now.

As well, nowhere within the module specs says nothing about PHP5.5 is s requirement

ruscoe’s picture

@manoloka, You can download a package containing the MailChimp library with all the dependencies normally provided by Composer:

https://github.com/thinkshout/mailchimp-api-php/releases/tag/v1.0.5

Direct link: https://github.com/thinkshout/mailchimp-api-php/releases/download/v1.0.5...

There's a note about it in the module's readme file: http://cgit.drupalcode.org/mailchimp/tree/README.txt#n93

The PHP 5.5 requirement is in the module's .info file: http://cgit.drupalcode.org/mailchimp/tree/mailchimp.info#n5

dawnbuie’s picture

So I'm having a really hard time finding out how to install the latest Mailchimp library. I hope someone can set me straight as there seem to be many options and none have worked fro me yet.

I tried using the (latest stable) 4.8 version of the Mailchimp module, got the missing library error, read this info on the module homepage*

So from https://github.com/thinkshout/mailchimp-api-php/releases I downloaded the recommended https://github.com/thinkshout/mailchimp-api-php/releasesFor PHP 5.6 and greater, download v1.0.7-package-no-dev.zip (I'm running PHP 5.6.27 on my server)

That's when I got the missing Guzzle error. Came to this forum. Now I see everyone is looking for answers. I tried downloading earlier versions of the folder as recommended above - v1.0.4 - v1.0.6. But those now cause my site to no longer function and I need to disable the Mailchimp module using drush to get webpage pack.

Then I consider installing Composer - despite the overkill and apparent problems on Drupal 7. But first I read #5 above and try that on my mac however I get errors:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 6.3.0 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.4 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.3 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.2 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - Installation request for phpunit/phpunit ^6.2.2 -> satisfiable by phpunit/phpunit[6.2.2, 6.2.3, 6.2.4, 6.3.0].

So then I try installing the last dev version of Mailchimp module - but same problem.

So... a simple Mailchimp library.. how to download it today and with what version of Mailchimp module, stable 4.8 or latest dev - should I pair it?

----
*

7.x-4.x

The 7.x-4.x release uses version 3.0 of the MailChimp API. A new library is available here and will need to replace the old library if you are upgrading the module from 7.x-3.x or 7.x2.x.

See the README.txt for library installation instructions.

Readme says:

MailChimp Library Installation
--------------------------------------------------------------------------------

# For MailChimp version 7.x-4.x

To use the Libraries module:

- Install the Libraries module:
https://www.drupal.org/project/libraries

- Download the current release of the MailChimp library:
https://github.com/thinkshout/mailchimp-api-php/files/710410/v1.0.6-pack...

- Locate your libraries directory. Usually:
/sites/all/libraries/

- Extract the archive to:
libraries/mailchimp

- Ensure the directory structure looks like this:

- libraries/
- mailchimp/
- src/
- Mailchimp.php
- MailchimpAPIException.php
- MailchimpCampaigns.php
- MailchimpLists.php
- MailchimpReports.php
- MailchimpTemplates.php
- vendor/
- autoload.php
- composer/
- guzzlehttp/
- psr/
- composer.json
- README.md

--

arne.olafson’s picture

Version 7.x-5.6 of the mailchimp module complains if you upload the above-mentioned mailchimp library versions, warning that you need to upgrade to the most recent 1.x version of the Mailchimp API, which is currently here:

https://github.com/thinkshout/mailchimp-api-php/releases/tag/v1.0.10