0

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.

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

Composer successfully installed to: /home5/columck5/common/composer.phar
Use it: php composer.phar
columck5@columbiablooms.org [~/common]# which php-cli
/usr/bin/php-cli
PHP Version     5.4.24


columck5@columbiablooms.org [/ramdisk/php/54/bin]# cd ~/common
columck5@columbiablooms.org [~/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

columck5@columbiablooms.org [~/common]# composer.phar

-bash: composer.phar: command not found

columck5@columbiablooms.org [~/common]# composer
columck5@columbiablooms.org [~/common]# php composer

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

No input file specified.

columck5@columbiablooms.org [~/common]# php-cli composer.phar
columck5@columbiablooms.org [~/common]# php-cli composer

Could not open input file: composer
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! – Sam Stamport Oct 30 '15 at 19:20
  • its not really important, put it in last. – Shabir A. Oct 30 '15 at 19:24
0

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, privacy policy and cookie policy

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