when using a drupal multisite installation, say for a host X.com, but with drupal-5.2/sites/default/settings.php being unaltered, drush is seemingly not working at all:
$ ./drush.php
$ ./drush.php help
$ ./drush.php -h
Invalid input: -h needs to be followed by an argument.root
$ ./drush.php --help

after lots of debugging, i found that it exits without an error message during phase DRUPAL_BOOTSTRAP_DATABASE in db_connect() because of $connect_url = 'mysql://username:password@localhost/databasename' (from default/settings.php). after more debugging and source reading i then found out about -l and indeed got it help with:
$ drush.php -l 'X.com'

witout modifying drupal itself, it might not be possible to improve the error message in this particular situation (i.e. have one), but to spare others these debugging hours, at the very least, drush/README.txt should be extended to describe that -l may be neccessary for drush.php to work at all on multisite drupal installations with unmodified/unused default/settings.php).

CommentFileSizeAuthor
#2 drush-README.diff907 bytestimj

Comments

moshe weitzman’s picture

please suggest new wording and i will change accordingly.

timj’s picture

StatusFileSize
new907 bytes

ok, i've attached a patch that adds the following text block:

Please not that drush requires a working drupal setup in order to function
correctly. So for multisite installations, specification of a working
multisite URL may be neccessary even for the 'help' commend to work:

$ drush -l http://association.drupal.org/drupal help

Related Options:
-r
, --root=
Drupal root directory to use (default: current directory)
-l , --uri= URI of the drupal site to use (only needed in multisite environments)
-v, --verbose Display all available output

moshe weitzman’s picture

Status: Active » Fixed

i committed this though it could still be improved. many people have working multi-sites but stil lhave trouble with drush.

Anonymous’s picture

Status: Fixed » Closed (fixed)