I apparently successfully installed Composer (for use with Drush) on bluehost. See messages below. It does not work, however. When I type composer.phar I get nothing or "command not found" among other error messages. See below.

I am a newbie so it may be that install worked just fine, but I just don't know how to properly execute composer to make sure it works.

I am using instructions found at http://avantidevelopment.com/install-composer-on-bluehost/ & https://www.drupal.org/node/2366283.

[email protected] [~/bin]# cd ~
[email protected] [~]# mkdir ~/common
[email protected] [~]# cd ~/common
[email protected] [~/common]# curl -sS https://getcomposer.org/installer | /ramdisk/php/54/bin/php54-cli
#!/usr/bin/env php
All settings correct for using Composer

Composer successfully installed to: /home5/columck5/common/composer.phar
Use it: php composer.phar
[email protected] [~/common]# which php-cli
PHP Version     5.4.24

[email protected] [/ramdisk/php/54/bin]# cd ~/common
[email protected] [~/common]# ls -l
total 1164

drwxr-xr-x  2 columck5 columck5    4096 Oct 29 08:37 ./

drwx--x--- 21 columck5 nobody      4096 Oct 28 09:15 ../

-rwxr-xr-x  1 columck5 columck5 1176136 Oct 29 08:37 composer.phar*

-rw-r--r--  1 columck5 columck5     575 Oct 29 08:38 error_log

[email protected] [~/common]# composer.phar

-bash: composer.phar: command not found

[email protected] [~/common]# composer
[email protected] [~/common]# php composer

Status: 404 Not Found
Content-type: text/html

No input file specified.

[email protected] [~/common]# php-cli composer.phar
[email protected] [~/common]# php-cli composer

Could not open input file: composer

2 Answers 2


Content-type:text-html means your script is running from CGI instead of CLI.

so try to fix your install so that the PHP in the path uses a CLI

One simple way to do is to write php path to php-cli instead of php-cgi.

# .bash_profile
export DRUSH_PHP=/ramdisk/php/54/bin/php54-cli
  • Sorry to be such a dummy, but the export line should be inserted as the last line of .bash_profile? There is so much to learn when trying to build a site using Drupal! Oct 30, 2015 at 19:20
  • its not really important, put it in last.
    – Shabir A.
    Oct 30, 2015 at 19:24

What finally worked was adding the following to .bash_profile.

alias composer="/ramdisk/php/54/bin/php54-cli ~/common/composer.phar"
export DRUSH_PHP=/ramdisk/php/54/bin/php54-cli
alias drush=”~/.composer/vendor/bin/drush”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.