4

I am getting a variety of errors when I try to use Drush and nothing seems to be working. I am able to run drush and see the help commands indicating that I have it installed; otherwise, I can't get anything to work. I get the following error when trying to update a module as an example:

Command pm-update needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command.
Command pm-update needs the following modules installed/enabled to run: update.
The drush command 'pm-update insert' could not be executed.
A Drupal installation directory could not be found

When I check the drush status output, I get the following, but it doesn't appear to have any of the other relevant site info that is shown in other examples (e.g. theme name, site name, etc.).

 PHP configuration     :  /etc/php.ini
 Drush version         :  4.5
 Drush configuration   :
 Drush alias files     :

Drush is currently installed in my home directory on a BlueHost shared account and my primary site is in the public_html directory; I have an additional site with a separate Drupal version and separate database in a subdirectory.

1 Answer 1

4

You need to call drush when you are within your Drupal folder. Otherwise drush does not know where your database is and so on.

cd /public_html/site2

Alternatively, you can set up a .drush/aliases.drushrc.php (Google should be able to tell you more about it) but that's probably not worth the effort in your case.

7
  • Thank you for the help. I tried going into my public_html to call drush while in that folder and I get the following error: [email protected] [~/public_html]# drush pm-update insert Drush command terminated abnormally due to an unrecoverable error. [error] Error: Cannot redeclare system_help() (previously declared in /home1/durangp4/public_html/modules/system/system.module:46) in /home1/durangp4/public_html/modules/modules/system/system.module, line 105 Thanks
    – Kory
    Mar 2, 2012 at 20:25
  • @Kory This means that you did it right, but that there is a fatal error in your drupal installation. You should not be able to view your site. Try to re-download drupal core.
    – googletorp
    Mar 2, 2012 at 20:50
  • Thank you @googletorp for your assistance and prompt reply! I was running 6.22 but my site was accessible -i.e. no WSOD. I just updated to Drupal 6.25 and ran update.php. Update was successful and shows up to date in my available updates reports. I tried drush again and am still getting the same error: Drush command terminated abnormally due to an unrecoverable error. [error] Error: Cannot redeclare system_help() (previously declared in /home1/durangp4/public_html/modules/system/system.module:46) in /home1/durangp4/public_html/modules/modules/system/system.module, line 105
    – Kory
    Mar 2, 2012 at 21:19
  • 3
    @Kory Ah I see, you have the system module twice, /modules/system and /modules/modules/system, you should only have one of them.
    – googletorp
    Mar 2, 2012 at 21:22
  • 1
    Try running update.php, that usually helps. If not, you need to look into the system table in your database and manually remove the double /modules/modules path for all modules which have it. Once you did that, you will also need to clear the cache_bootstrap table and then you should be back up and running I hope :)
    – Berdir
    Mar 2, 2012 at 22:12

Your Answer

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

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