Installing Drush 7.0-dev on a shared hosting server [documentation + cry for help]

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
tdodson's picture

Hi Everyone,

I was getting ready to develop a new, responsive theme for my portfolio site/tech blog and thought I would jump right in with building an Omega sub-theme as I had before. I discovered, though, that all the cool kids are using Omega 4 and that Omega 4 relied on the latest version of Drush to do its magic of building sub-themes from the command line.

I installed the current version of Drush (and composer, which I hadn't had before) and followed all the directions for manual install from the drush project on github (https://github.com/drush-ops/drush). I had a couple minor mis-steps, but ultimately I got to a lovely drush status from /var (where I installed it) that said:

PHP executable : /usr/bin/php
PHP configuration : /etc/php5/cli/php.ini
PHP OS : Linux
Drush version : 7.0-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files :

And when I go into a subfolder containing a particular drupal instance (cd/var/www/techneblog), I get this:

Drupal version : 7.22
Site URI : http://default
PHP executable : /usr/bin/php
PHP configuration : /etc/php5/cli/php.ini
PHP OS : Linux
Drush version : 7.0-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /var/www/techneblog
Site path : sites/default

"Great," I thought. It sees the site. But whenever I try to do anything, drush can't actually find the site or do anything useful.

In response to "drush cc all" I get:

"No Drupal site found, only 'drush' cache was cleared. "

I try to enable a module, like so "drush en trigger", and I get something even nastier:

Command pm-enable needs a higher bootstrap level to run - you will [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'en trigger' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This may occur when Drush is trying to:
* bootstrap a site that has not been installed or does not have a
configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri
parameter on the command line. See drush topic docs-aliases for
details.
* connect the database through a socket. The socket file may be
wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.

Drush was attempting to connect to:
Drupal version : 7.22
Site URI : http://default
PHP executable : /usr/bin/php
PHP configuration : /etc/php5/cli/php.ini
PHP OS : Linux
Drush version : 7.0-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /var/www/techneblog
Site path : sites/default

So . . . anyone encountered this before? I've had this same directory structure and sites before and earier versions of Drush worked find. Thanks for any insight folks can provide.

If you're interested in how I went about installing the new version of Drush (mistakes included), here is more or less a transcript of what I typed on the command line and any errors I got (and corrected):

Downloaded drush from github: https://github.com/drush-ops/drush
Placed in /var
chmod u+x /var/drush/drush [makes drush executable]
ln -s /var/drush/drush /usr/bin/drush [symbolic link to drush executable in usr/bin]

cd /var/drush
composer install
MESSAGE: -bash: /usr/local/bin/composer: No such file or directory

cd /var
curl -sS https://getcomposer.org/installer | php [install composer]
mv composer.phar /usr/local/bin/composer [move composer to bin so it can be used globally]

cd/var/drush
composer install

MESSAGE

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
- Installing d11wtq/boris (v1.0.8)
Downloading: 100%

  • Installing pear/console_table (1.1.5)
    Downloading: 100%

  • Installing phpunit/php-token-stream (1.2.2)
    Downloading: 100%

  • Installing symfony/yaml (v2.2.1)
    Downloading: 100%

  • Installing sebastian/version (1.0.3)
    Downloading: 100%

  • Installing sebastian/exporter (1.0.1)
    Downloading: 100%

  • Installing sebastian/environment (1.0.0)
    Downloading: 100%

  • Installing sebastian/diff (1.1.0)
    Downloading: 100%

  • Installing phpunit/php-text-template (1.2.0)
    Downloading: 100%

  • Installing phpunit/phpunit-mock-objects (2.0.5)
    Downloading: 100%

  • Installing phpunit/php-timer (1.0.5)
    Downloading: 100%

  • Installing phpunit/php-file-iterator (1.3.4)
    Downloading: 100%

  • Installing phpunit/php-code-coverage (2.0.5)
    Downloading: 100%

  • Installing phpunit/phpunit (4.0.17)
    Downloading: 100%

  • Installing symfony/process (v2.4.5)
    Downloading: 100%

d11wtq/boris suggests installing ext-readline (*)
pear/console_table suggests installing pear/Console_Color (>=0.0.4)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files

drush status
MESSAGE: -bash: /usr/local/bin/drush: No such file or directory

ln -s /var/drush/drush /usr/local/bin/drush [put symbolic link to drush where it is expected to be found = up and running]

Comments

+1 with this problem

dboeger's picture

TDodson,

I've had the same problem plaguing me on a local install on my mac. Please let me know if you get it resolved.

Problem with drush

Richard Damon's picture

I had a similar problem with one server, and it turned out that they had set me up with a jailed shell, and basically you couldn't use mysql from the command line (as the jail shell couldn't connect to the socket needed to run mysql).

The solution was to get the hosting provide to give me unjailed access to the server.

Boston

Group categories

More Specifically

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week