php - installing composer on a shared host -


i trying install composer on shared host first time.

when run curl -ss https://getcomposer.org/installer | php getting composer installed
user it: php composer.phar

when run php composer.phar getting warring error:

warning: composer should invoked via cli version of php, not cgi-fcgi sapi

any ideas on how fix ? , why getting error ? :(

when run php -v back

php 5.4.39 (cgi-fcgi) (built: mar 25 2015 14:20:20)   copyright (c) 1997-2014 php group   zend engine v2.4.0, copyright (c) 1998-2014 zend technologies       zend guard loader v3.3, copyright (c) 1998-2013, zend technologies 

do need run using cli version if how ?

any nice thank you.

i resolved explicitly calling version of php asked for. keep in mind on shared server environment there multiple versions of php running , though may have set default in cpanel config, bash commands resolve (lower) version.

first, created bin directory , moved composer.phar it. then, added alias .bash_profile , worked charm:

alias composer="/usr/php/54/usr/bin/php-cli ~/bin/composer.phar" 

hope helps!


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -