Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I was hoping for help in getting Drush to work on my websites. I am pretty experienced with Drupal but by no means a programmer and I am very novice at SSH command line. I am getting a variety of errors when I try to utilize drush and nothing seems to be working. I am able to run the command $ drush and see the help commands indicating that I have it installed but otherwise, I cant 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   [error]
need invoke drush from a more functional Drupal environment to run
this command.
Command pm-update needs the following modules installed/enabled to   [error]
run: update.
The drush command 'pm-update insert' could not be executed.          [error]
A Drupal installation directory could not be found 

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

durxxxx@durangoxxxx.com [~]# drush status
 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 and I have an additionl site with a separate Drupal version and separate DB in a subdirectory (e.g. /public_html/site2).

Any assistance in finding my issue would be greatly appreciated!

share|improve this question

1 Answer

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.

share|improve this answer
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: durangp4@durangotherapist.com [~/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 '12 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 '12 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 '12 at 21:19
2  
@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 '12 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 '12 at 22:12
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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