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).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush-README.diff | 907 bytes | timj |
Comments
Comment #1
moshe weitzman commentedplease suggest new wording and i will change accordingly.
Comment #2
timj commentedok, 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
Comment #3
moshe weitzman commentedi committed this though it could still be improved. many people have working multi-sites but stil lhave trouble with drush.
Comment #4
(not verified) commented