Drupal MailChimp PHP库缺少所需的HTTP库

Drupal MailChimp PHP库缺少所需的HTTP库,drupal,mailchimp,guzzle,Drupal,Mailchimp,Guzzle,我已经通过SSH在我的Godaddy共享主机上安装了Guzzle,但我的Drupal站点仍然告诉我: MailChimp PHP库缺少所需的HTTP库。 请查看README.txt中的安装说明。“ 你知道为什么会这样说吗?它似乎已正确安装 godaddy@user [~/public_html]$ php composer.phar require guzzlehttp/guzzle:~6.0 ./composer.json has been created Loading composer r

我已经通过SSH在我的Godaddy共享主机上安装了Guzzle,但我的Drupal站点仍然告诉我:

MailChimp PHP库缺少所需的HTTP库。 请查看README.txt中的安装说明。“

你知道为什么会这样说吗?它似乎已正确安装

godaddy@user [~/public_html]$ php composer.phar require guzzlehttp/guzzle:~6.0
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing guzzlehttp/promises (1.2.0)
    Downloading: 100%         

  - Installing psr/http-message (1.0)
    Downloading: 100%         

  - Installing guzzlehttp/psr7 (1.3.0)
    Downloading: 100%         

  - Installing guzzlehttp/guzzle (6.2.0)
    Downloading: 100%         

Writing lock file
Generating autoload files

这解决了问题,Guzzle需要安装到MailChimp库文件夹中


在library页面上,如果您使用的软件包包含所有内容,例如v1.0.6-package.zip(因此,拥有所有内容并不需要composer来获取它们),然后从.gitignore中删除/vendor,以便将/vendor-包括guzzle中的所有文件都包含在您的代码库中,这样,如果您将repo中的代码部署到生产服务器,所有文件都将被加载


信用证:

请注意,该库尚未更新到API v3.0,因此在2016年底MailChimp时可能无法继续工作。gitignore正是我错过的。没有注意到我的live目录中缺少供应商文件夹。谢谢+我很高兴它为您@CJdriver提供了进一步的提示:一旦此解决方案就位,您可能需要至少清除一次Drupal缓存,错误消息才会消失。通过网站的管理页面,通过:admin/config/development/performance清除缓存只需一次。然而,在本地开发环境中,当使用drush时,也就是说,
drush cc all
,我的特定站点不止一次需要这样做。它可能不适合你,但只是让你知道这种可能性,以防你认为解决方案不起作用。
godaddy@user [~/public_html]$ cd sites/all/libraries/mailchimp/
godaddy@user [~/public_html/sites/all/libraries/mailchimp]$ curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading 1.1.1...

Composer successfully installed to: /home/mysite/public_html/sites/all/libraries/mailchimp/composer.phar
Use it: php composer.phar
godaddy@user [~/public_html/sites/all/libraries/mailchimp]$ ./composer.phar install
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing sebastian/version (1.0.6)
    Downloading: 100%         

  - Installing sebastian/global-state (1.1.1)
    Downloading: 100%         

  - Installing sebastian/recursion-context (1.0.2)
    Downloading: 100%         

  - Installing sebastian/exporter (1.2.1)
    Downloading: 100%         

  - Installing sebastian/environment (1.3.7)
    Downloading: 100%         

  - Installing sebastian/diff (1.4.1)
    Downloading: 100%         

  - Installing sebastian/comparator (1.2.0)
    Downloading: 100%         

  - Installing symfony/yaml (v3.0.6)
    Downloading: 100%         

  - Installing doctrine/instantiator (1.0.5)
    Downloading: 100%         

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%         

  - Installing phpspec/prophecy (v1.6.0)
    Downloading: 100%         

  - Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%         

  - Installing phpunit/phpunit-mock-objects (2.3.8)
    Downloading: 100%         

  - Installing phpunit/php-timer (1.0.8)
    Downloading: 100%         

  - Installing phpunit/php-token-stream (1.4.8)
    Downloading: 100%         

  - Installing phpunit/php-file-iterator (1.4.1)
    Downloading: 100%         

  - Installing phpunit/php-code-coverage (2.2.4)
    Downloading: 100%         

  - Installing phpunit/phpunit (4.8.21)
    Downloading: 100%         

  - Installing guzzlehttp/promises (1.2.0)
    Loading from cache

  - Installing psr/http-message (1.0)
    Loading from cache

  - Installing guzzlehttp/psr7 (1.3.0)
    Loading from cache

  - Installing guzzlehttp/guzzle (6.2.0)
    Loading from cache

sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files