Closed (fixed)
Project:
Drush
Version:
6.x-3.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2009 at 05:18 UTC
Updated:
24 Nov 2010 at 06:28 UTC
I am getting this error on every command I attempt to run and I am not quite sure what I am doing wrong. I followed the readme instructions, and I can access the drush command from my drupal install. At one point I could see info when I did 'drush status', but now even that command tells me it could not be completed. Is there something I am missing?
Comments
Comment #1
jonhattanplease do run commands with --debug and post here the results. Also specify your environment (os, php version,..)
Comment #2
chrisabbato commentedHere are a few of the results.
[root@localhost xxxx]# drush --debug update
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.025 sec] [bootstrap]
Initialized Drupal 6.8 root directory at /var/www/html/drupal [0.036 [notice]
sec]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.039 sec] [bootstrap]
Initialized Drupal site xxxx at sites/xxxx [notice]
[0.137 sec]
Drush command could not be completed. [0.137 sec] [error]
[root@localhost xxxx]# drush --debug info
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.025 sec] [bootstrap]
Initialized Drupal 6.8 root directory at /var/www/html/drupal [0.037 [notice]
sec]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.039 sec] [bootstrap]
Initialized Drupal site xxxx at sites/xxxx [notice]
[0.137 sec]
Drush command could not be completed. [0.137 sec] [error]
[root@localhost xxxx]# drush --debug status
Found command: status [0.025 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.026 sec] [bootstrap]
Initialized Drupal 6.8 root directory at /var/www/html/drupal [0.037 [notice]
sec]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.038 sec] [bootstrap]
Initialized Drupal site xxxx at sites/xxxx [notice]
[0.133 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [bootstrap]
[0.133 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.138 [bootstrap]
sec]
Successfully connected to the Drupal database. [0.138 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.143 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.592 sec] [bootstrap]
PHP configuration : /etc/php.ini
Drupal Root : /var/www/html/drupal
Drupal version : 6.8
Site Path : sites/xxxx
Site URI : http://xxxx
Database Driver : mysqli
Database Hostname : localhost
Database Username : chris
Database Name : xxxx (this was correct)
Database Password : xxxx
Database : Connected
Drupal Bootstrap : Successful
Drupal User : Anonymous
Command dispatch complete [0.597 sec] [notice]
I am doing this in a subdirectory of the site I want it to work on. My modules are in the sites/all/modules folder. PHP version is 5.2.6. OS is CentOS 5, I believe. I am in the process of updating all of my modules and Drupal core. I am thinking perhaps because my Drupal version is older it may not be working, however I would expect maybe a different error to come up. Also, it says All Versions.
Thanks for the help, I am really looking forward to getting this module working. It looks like it will help drastically in keeping sites updated and maintained. :)
Comment #3
chrisabbato commentedComment #4
jonhattan@chrisabbato: I recently realized that `drush --verbose --debug` is even more verbose. Perhaps it give some clue :)<- debug implies verbose.It is surprising that all commands halt after bootstrapping to drupal_site but `drush status` is able to do a full bootstrap and complete execution succesfully. I'm out of ideas here.
Does happen the same with for example `drush cron` or `drush cache clear`?
Do you have any drush extension?
Comment #5
franzCheck this: I can updatecode with drush, it will download updates and install them:
Curiously, if try the following (which is, dl a new module), it fails:
Comment #6
chrisabbato commentedSome updated news, yes the operation fails to run cron as well as cache clear.
**However** I recently built a local dev server and threw up a fresh install of drupal and drush, and everything works find. I was able to dl modules, as well as run an update successfully.
Does it make any difference that I have several (4-5) sites in separate folders and nothing in default, and all of my modules in the /all folder?
Comment #7
moshe weitzman commentedno idea. need more info. i suggest focusing in the dl failure since thats a simpler command.
Comment #8
smk-ka commentedGlobalredirect breaks Drush because it executes drupal_goto() during hook_init()... might that be the cause for you guys too?
Comment #9
dodorama commentedI'm having the same issue. I removed all modules from sites/all directory and drush worked. Then I tried to put the modules back in the directory one by one to see if I could find one that caused drush to not work but it's not possible to point to one specific module since different combinations had given different results.
I'm using drush on MAMP and CVS as package-handler.
Comment #10
smk-ka commented@dodazzi
If you have a temporary site and are interested to find out which module is terminating the script execution, you could try this:
Open
includes/module.inc(of Drupal, not Drush) in an editor, and replacewith
The last module name printed is the one that terminates the script (executes drupal_goto() or the like) somewhere in its hook_init() function.
Lastly, here is the patch for globalredirect.
Comment #11
dodorama commentedThanks for the hint.
Unfortunately I haven't been able to get it working.
I tried to modify module.inc but my drupal installation breaks.
Anyway where should I look for the printed modules, in the command line when running drush --debug status?
Comment #12
sindhujavn commentedaegir@classle-desktop:~/drupal-5.x$ drush --debug update
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.042 sec] [bootstrap]
Loading drushrc "/var/aegir/drupal-5.x/drushrc.php" into "drupal" [bootstrap]
scope. [0.042 sec]
Initialized Drupal 5.18 root directory at /var/aegir/drupal-5.x [notice]
[0.064 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.069 sec] [bootstrap]
Initialized Drupal site default at sites/default [0.071 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [bootstrap]
[0.075 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.086 [bootstrap]
sec]
Successfully connected to the Drupal database. [0.086 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.094 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.213 sec] [bootstrap]
Command update needs the following modules installed/enabled to run: [error]
update_status. [0.215 sec]
The command 'drush.php update' could not be executed. [0.216 sec] [error]
i am getting this as output. but i have update_status module in my sites directory.. how to proceed ??
Comment #13
sindhujavn commentedaegir@classle-desktop:~/drupal-5.x$ drush --debug update
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.042 sec] [bootstrap]
Loading drushrc "/var/aegir/drupal-5.x/drushrc.php" into "drupal" [bootstrap]
scope. [0.042 sec]
Initialized Drupal 5.18 root directory at /var/aegir/drupal-5.x [notice]
[0.064 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.069 sec] [bootstrap]
Initialized Drupal site default at sites/default [0.071 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [bootstrap]
[0.075 sec]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.086 [bootstrap]
sec]
Successfully connected to the Drupal database. [0.086 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.094 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.213 sec] [bootstrap]
Command update needs the following modules installed/enabled to run: [error]
update_status. [0.215 sec]
The command 'drush.php update' could not be executed. [0.216 sec] [error]
i am getting this as output. but i have update_status module in my sites directory.. how to proceed ??
Comment #14
smk-ka commented@dodazzi
Ah, yes, I should have noted that it breaks the website.
Exactly, or any command with --debug option.
Comment #15
xtfer commentedI have the same problem as #9.
On my test server I have several test or dev sites running various versions of Drupal (depending on when I last used them). Drush is not working on anything that is 6.12 to 6.14, however it IS working on a 6.9 install.
Comment #16
franzTo make things more confusing, my issue just vanished, and I can't remember any particular reason for it. It couldn't 'dl' any modules or drupal sources, and, without updating drush, it started to work. Maybe I updated php, and that did it (I remember to have added new options as I needed for other reasons, I think it was about XML).
Well, can't help much now, hope it's a good hint.
Comment #17
webthingee commentedI have drush installed outside of my drupal install.
There was ALSO a copy of Drush in the modules directory of the site I was trying to use drush....
I get errors when I run the command 'drush'
I removed drush from inside the sites/all/modules of the specific install and it works fine.
edit to end of Commands section....
Hopefully this info helps someone.
Comment #18
jrao commentedHere's another tip for debugging this problem: enable php log file and check your php error log for errors. I got this problem when I downloaded coder module, checking the error log shows "Call to undefined function t() in drupal\sites\all\modules\coder\coder.drush.inc on line 10", which led to this issue: http://drupal.org/node/455722
Comment #19
chucklima commentedThanks webthingee - #17
Drush Extras must be deleted.
I had and old copy of sites/all/modules/drush_extras/ laying around.
Make sure you get rid of it!
Comment #20
colin49 commentedIt seems people in this thread are having a few different issues. In my case I had two issues. One with the coder module and one due to not having update_status module installed.
1. If you have the "coder" module installed you will get errors about "t()...". Depending on what version you have installed you might need to update it, patch it (http://drupal.org/node/455722), or disable and remove it.
2. If you don't have the Drupal Module Update Status (http://drupal.org/project/update_status) installed you will get a error message from Drush about an "update module" being missing. Make sure update_status is installed and enabled.
Comment #21
moshe weitzman commentedComment #22
msumme commentedI'm also having the same problem as #9,
This actually happens no matter what directory i try to run this command from... It's a live site, so I can't really start tinkering with the file system while it's running...
Any idea would be greatly appreciated. I've tried everything on this page...
Comment #23
attheshow commentedI had an issue similar to #9. I tried systematically removing modules from my drupal-contrib modules directory. Found out that my issue was being caused by an older version of Coder module. After I updated to the latest beta version of Coder, the problem disappeared.
Comment #24
jasonrwd commentedI was having the issue of "drush command could not be completed" with any command I ran, as several above had. I decided to update all of my modules manually as that seemed to help some. I also updated my Drush version to HEAD and everything seems to be fine now. I hope that helps others that might be experiencing the same problem.
Comment #25
moshe weitzman commentedplease reopen if there is a todo.
Comment #26
jody lynnI got stuck on this same 'drush command could not be completed' message and in my case it was due to securepages module: #472338: Drush Incompatible With Secure Pages Module
Comment #27
dodorama commentedI found out that in most cases if you're experiencing a "Cannot modify header information..." error you have to increase the php memory limit.
If you're using MAMP PRO be aware that it's not enough to increase the limit editing the template through MAMP PRO UI but you have to change the php.ini file in /Applications/MAMP/conf/php5/php.ini (apparently when using drush MAMP PRO php.ini isn't used).
http://drupal.org/node/505630#comment-2307142
A different issue is when you can correctly run "drush status" but you can't download, run cron and clear cache. This is probably due to an incompatibility with a module. In my case it was the "coder" module. Following this issue #455722: use of t() in coder.drush.inc line 10 should be replaced with dt() I solved the errors by installing the dev version.
I hope this helps.
Comment #28
sdelmas commentedThis may be useless at this point, but I ran into the same error message today (doing help, as well as update sub commands), and found out that in my case this was caused by a missing pear module (Console_Table). I installed that, and everything works fine.
Comment #29
sagannotcarl commentedThis problem was solved for me by increasing my memory limit in php.ini.
Thanks jrao (#18) for the tip to look in the log files. I found that the memory limit was being exceeded.
Comment #30
zach harkey commented@dodazzy: You rule.
Comment #31
drecute commentedHello,
In my case, I found out that it has something to do with the fact that there was no site configured to use default. So configuring settings.php for the default site solved this problem.
So as mentioned in #6, this is definitely a possibility.
Comment #32
jimbox commentedfound incompatibility w/ the mobile_tools module.
error was resolved by manually disabling mobile_tools.
was running rush 6.x-3.3 on core 6.19.
Found command: core-status (commandfile=core) [0.04 sec, 3.46 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.04 sec, 3.48 MB] [bootstrap]
Initialized Drupal 6.19 root directory at /home/webkong/drupal [0.05 sec, 4.28 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.05 sec, 4.29 MB] [bootstrap]
Initialized Drupal site default at sites/default [0.12 sec, 5.13 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.13 sec, 5.14 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.13 sec, 5.14 MB] [bootstrap]
Successfully connected to the Drupal database. [0.13 sec, 5.14 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.13 sec, 5.48 MB] [bootstrap]
session_start(): Cannot send session cookie - headers already sent by (output started at [warning]
/home/webkong/drush/includes/drush.inc:820) bootstrap.inc:1162 [0.13 sec, 5.57 MB]
session_start(): Cannot send session cache limiter - headers already sent (output started at [warning]
/home/webkong/drush/includes/drush.inc:820) bootstrap.inc:1162 [0.13 sec, 5.58 MB]
Cannot modify header information - headers already sent by (output started at [warning]
/home/webkong/drush/includes/drush.inc:820) mobile_tools.module:414 [0.15 sec, 7.38 MB]
Undefined index: SERVER_NAME uc_store.module:559 [0.15 sec, 7.39 MB] [notice]
Undefined index: q uc_store.module:559 [0.15 sec, 7.39 MB] [notice]
Undefined index: parent browscap.module:85 [0.15 sec, 7.44 MB] [notice]
Cannot modify header information - headers already sent by (output started at [warning]
/home/webkong/drush/includes/drush.inc:820) mobile_tools.module:922 [0.16 sec, 8.24 MB]
Drush command could not be completed. [0.16 sec, 8.25 MB] [error]