How do I run Composer via SSH?

Mandraled Hosting operates multiple PHP versions. When executing commands like Composer via SSH, the system defaults to a basic PHP version used for internal tools. To access a fully-featured PHP installation, users must specify the complete path to their desired PHP version.

Solution

The command requires specifying the PHP version explicitly. For example, using PHP 7.1:

/usr/bin/php71 -f /usr/bin/composer

A complete installation command would look like:

/usr/bin/php71 -f /usr/bin/composer install

Additional Information: Upon SSH login, users receive a message of the day (MOTD) that displays all available PHP versions on their server.