Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing mobile_tools DRUSH stopped working.
Here is a debug trace:
drush -d cc
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.04 sec, 2.2 MB] [bootstrap]
Initialized Drupal 6.16 root directory at /home/mybreathbiofeedback.com/web/public [0.05 sec, 2.7 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.06 sec, 2.76 MB] [bootstrap]
Initialized Drupal site mybreathbiofeedback.com at sites/default [0.12 sec, 2.85 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.13 sec, 2.9 MB] [bootstrap]
PDO support not available. Could not pre-validate database credentials. Assuming success [0.14 sec, 2.91 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.14 sec, 2.91 MB] [bootstrap]
Successfully connected to the Drupal database. [0.14 sec, 2.91 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.15 sec, 3.12 MB] [bootstrap]
session_start(): Cannot send session cookie - headers already sent by (output started at /opt/local/share/drush/includes/drush.inc:660) bootstrap.inc:1037 [0.15 sec, 3.18 MB] [warning]
session_start(): Cannot send session cache limiter - headers already sent (output started at /opt/local/share/drush/includes/drush.inc:660) bootstrap.inc:1037 [0.15 sec, 3.18 MB] [warning]
Constant DRUPAL_MINIMUM_PHP_MEMORY_LIMIT already defined drupal_tweaks.module:17 [0.16 sec, 3.72 MB] [notice]
Undefined index: SERVER_NAME mobile_tools.module:728 [0.17 sec, 4.02 MB] [notice]
Cannot modify header information - headers already sent by (output started at /opt/local/share/drush/includes/drush.inc:660) mobile_tools.module:410 [0.17 sec, 4.02 MB] [warning]
Undefined index: parent browscap.module:85 [0.17 sec, 4.05 MB] [notice]
Cannot modify header information - headers already sent by (output started at /opt/local/share/drush/includes/drush.inc:660) mobile_tools.module:906 [0.18 sec, 4.78 MB] [warning]
Drush command could not be completed. [0.18 sec, 4.78 MB]
Comment | File | Size | Author |
---|---|---|---|
#4 | diff.patch | 92.57 KB | kbalderson |
Comments
Comment #1
sasconsul CreditAttribution: sasconsul commentedSorry, I reported the wrong version number.
Comment #2
deverman CreditAttribution: deverman commentedyes we are also experiencing this problem with drush version 3.1 and it is very painful to manage our servers now as we need to disable the module each time. Would really like a fix for this.
Comment #3
kbalderson CreditAttribution: kbalderson commentedsubscribing
Comment #4
kbalderson CreditAttribution: kbalderson commentedSo i think i have a fix for this. I check to see if a drush function is available, and if it is, i skip over the hook_boot command.
That code goes before anything else in the function 'mobile_tools_boot'.
I attached a patch... not sure if i did it right.
Comment #5
kbalderson CreditAttribution: kbalderson commentedComment #6
twom CreditAttribution: twom commentedI replaced the reference from SERVER_NAME to HTTP_HOST with an exra check if this variable is set...
Can you test the dev version (that contains multple changes, so be aware that it is a dev release)
Tom
Comment #7
kbalderson CreditAttribution: kbalderson commentedI tested the -dev and it worked great for me. Thanks.
Comment #9
ricardoamaro CreditAttribution: ricardoamaro commentedHi,
This is still not resolved.
If you enable "mobile_tools" and check this option:
"Enable automatic redirection of the mobile user"
Now try to run Drush and it will fail:
drush -v status
Initialized Drupal 6.19 root directory at ..../public_html [notice]
Initialized Drupal site default at sites/default [notice]
session_start(): Cannot send session cookie - headers already sent by (output started at [warning]
drush.inc:871) bootstrap.inc:1162
session_start(): Cannot send session cache limiter - headers already sent (output started at [warning]
drush/includes/drush.inc:871) bootstrap.inc:1162
Undefined index: SERVER_NAME mobile_tools.module:728 [notice]
Cannot modify header information - headers already sent by (output started at [warning]
drush/includes/drush.inc:871) mobile_tools.module:410
Cannot modify header information - headers already sent by (output started at [warning]
drush/includes/drush.inc:871) mobile_tools.module:906
Drush command could not be completed. [error]
This is happening with the latest version of drush (3.3) and mobile_tools stable 6.x-1.12 and dev
Could the maintainers of mobile_tools please help us here??
Thanks!
Comment #10
ricardoamaro CreditAttribution: ricardoamaro commentedbump??
Comment #11
jimbox CreditAttribution: jimbox commentedhad to disable mobile_tools to facilitate using drush again.
Comment #12
twom CreditAttribution: twom commentedI am working on this issue.
The strange thing is that it works fine in my install.
What configuration are you using (php version, apache/IIS, ... )?
Comment #13
twom CreditAttribution: twom commentedI have added an extra check to see if the $_SERVER variable is set.
Mainly it comes down that if you run drush, you use php from the command line. Of course no SERVER_NAME or HTTP_HOST is set then.
If you have error_reporting E_STRICT enabled, it will give an error message.
Can you try the new dev version?
Comment #14
twom CreditAttribution: twom commentedComment #15
silvio CreditAttribution: silvio commentedStill having this problem even with the 6.x dev version. Seems that solution proposed at #1139540: drush incompatibility is the way to go.
Comment #16
twom CreditAttribution: twom commentedI have added the fix in the dev version! Thx for the feedback.
Comment #17
sterndata CreditAttribution: sterndata commentedThe solution is easy:
drush -l http://my.website.address [drush commands]
If you tell drush the site name, it's not confused by the redirection.
Comment #19
bkosborneI'm still getting this problem with 2.3 (which was released after this was supposedly fixed?). I see the fixed code is in current dev for 6.x but not 6.x-2.3.
Could we get a new release for this?