Support Center » Knowledgebase » Unix Tips » How to install PHP Composer

How to install PHP Composer



We'd recommend installing composer in your own account. Installing composer is quite simple, and the instructions are provided by composer itself at https://getcomposer.org/

Because we provide several different php versions, you can choose which version to use.

PHP 5.6: /hsphere/shared/php56/bin/php-cli
PHP 7.0: /hsphere/shared/php70/bin/php-cli
PHP 7.1: /hsphere/shared/php71/bin/php-cli

And so on. Simply replace the "phpxx" bit with the version you require, for example, if you want to use PHP 7.2, simply use "php72", equally for PHP 5.3, use "php53".

You can create a symlink for this in your bin directory:

mkdir ~/bin
ln -s /hsphere/shared/php71/bin/php-cli ~/bin/php

After this, when you typed "php" it will refer to php 7.1.


Article Details
Article ID: 236
Created On: 04 Aug 2017 08:33 AM
 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
Please note that the login and password to the support area is NOT the same as your hosting control panel login and password
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Downloads | Control Panel User's Guide | Server Status
Language: