I'm trying to integrate the site on Drupal 7 with the mailchimp mailing service. Installed the module for the MailChimp drupal

In the module settings, I inserted the api key for mailchimp. And here there were problems

  1. For the module to work, the MailChimp PHP library is needed. It downloaded and uploaded it to the libraries folder like all the rules.

  2. in the archive with the library files there is a file composer.json

{ "name": "thinkshout/mailchimp-api-php", "version": "1.0.2", "type": "library", "description": "PHP library for v3 of the MailChimp API", "keywords": ["mailchimp", "mail"], "homepage": "https://github.com/thinkshout/mailchimp-api-php", "require": { "php": ">=5.5.0", "guzzlehttp/guzzle": "~6.1" }, "require-dev": { "phpunit/phpunit": "4.8.21" }, "autoload": { "psr-4": { "Mailchimp\\": "src/" } }, "autoload-dev": { "psr-4": { "Mailchimp\\Tests\\": "tests/src/" } } } 

The site lies on the shared hosting reg ru I connect via SSH, I go to the folder with the MailChimp library, I run the php composer.phar install command, it downloads and the screen shows errors in the console. enter image description here

and then the question arose how to increase the version of php in the console from 5.3 to 5.5, google found out that in the console one version, in the hosting control panel another. Ie just switching the version in the panel did not help. And how to install the extension for php dom? tried to do through ssh, not enough permissions to execute the command. So I understand to write only in TP reg ru

And how do I solve the problem with the php version in the console? also write to TP?

Thanks for any help.

  • 1. It is better to provide text information in the form of text, not pictures: it is more convenient to read, and search engines will index it. 2. Yes, it is better to first discuss this problem with technical support. I suspect, however, that the problem has already been discussed, and, possibly, is present in the "frequently asked questions" on the site of the hoster. - aleksandr barakin

1 answer 1

If your hoster has several versions of PHP, then you just need to specify the full path to the desired version. Most likely the full path is listed either in the control panel on the site of the host, or in his FAQ. That is, you need to write not php composer.phar install , but something like /usr/local/php55/bin/php composer.phar install .

But you can hardly install the extension. But generally DOM is enabled by default . Perhaps you just need to connect the configuration file, where this extension is written. My host can include the necessary PHP parameters in the site settings, and then connect the PHP configuration file from this site in the console via the -c parameter: /usr/local/php55/bin/php -c /.../my.site.ini ... It is possible that you also just need to specify a specific .ini file. If suddenly, for some reason, this extension is really missing - then contact the hoster's TP, with a request to install it.


Addition:

By the way, here are links from Reg.ru FAQ on your questions: dom , PHP version selection

  • Thank you very much! It was really worth pointing the way to the version of php I needed. An example of my team: /opt/php/5.5/bin/php-cgi composer.phar install all the necessary dependencies have been fixed and the error associated with the dom extension has disappeared - Sergey Zaigraev