我已经通过SSH在我的Godaddy共享主机上安装了Guzzle,但我的Drupal网站仍在告诉我:
“MailChimp PHP库缺少必需的GuzzleHttp库。 请查看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
答案 0 :(得分:1)
在图书馆页面上,如果您使用的包https://github.com/thinkshout/mailchimp-api-php/releases包含所有内容,例如v1.0.6-package.zip(因此所有内容都不需要编写器来获取它们),然后从.gitignore中删除/ vendor,以便/ vendor中的所有文件 - 包括guzzle都包含在您的代码库中,以便您将代码从repo部署到生产服务器,所有这些代码都将被加载。
答案 1 :(得分:0)
这解决了问题,Guzzle需要安装到MailChimp库文件夹中吗?! Guzzle Instructions
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