I am in the process of applying the Drupal Cor security update and that breaks Drush's ability to run core-cron.

Attached is a zip file with three text file logged run outputs. I am actually running drush-6.x-3.3.tar.gz currently for D6 sites. I also tried drush-All-versions-4.2.tar.gz which also fails to run with D6.22 applied.

So, last good run while at D6.20, and two error reports, one with Drush 3 and one with Drush 4.

CommentFileSizeAuthor
drush_cron_error.zip2.36 KBmdlueck

Comments

Methos76’s picture

[posted here by error, sorry]

mdlueck’s picture

An update, I found this bug report:

"Drush unable to update to 6.22"
http://drupal.org/node/1169776

I upgraded to the stable release of drush-7.x-4.4.tar.gz and running core-cron still exhibits the same errors I had reported here before. So no change.

mdlueck’s picture

Version: All-versions-4.2 » 7.x-4.4
greg.1.anderson’s picture

core-cron works fine for me in drush-5.x master after upgrading to Drupal 6.22.

mdlueck’s picture

Very well, I pulled down: All-versions-5.x-dev drush-All-Versions-HEAD.tar.gz 2011-Feb-03

And yet receive errors trying to run cron:

20110530-173601 drush core-cron cron.php begin
X-Powered-By: PHP/5.2.17

Content-type: text/html



Bootstrap to phase 0. [0.03 sec, 1.27 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.03 sec, 1.4 MB]  [bootstrap]
Bootstrap to phase 6. [0.08 sec, 3.09 MB]                                                                                [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.08 sec, 3.1 MB]                                                [bootstrap]
Initialized Drupal 6.22 root directory at /kunden/homepages/35/d157794216/htdocs/sites/s157794238.onlinehome.us/www [0.09   [notice]
sec, 3.6 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.09 sec, 3.61 MB]                                               [bootstrap]
Initialized Drupal site s157794238.onlinehome.us at sites/default [0.09 sec, 3.61 MB]                                       [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.09 sec, 3.61 MB]                                      [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.12 sec, 3.64 MB]                                           [bootstrap]
Successfully connected to the Drupal database. [0.12 sec, 3.64 MB]                                                       [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.13 sec, 3.86 MB]                                               [bootstrap]
session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers        [warning]
already sent by (output started at /homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:1161
[0.14 sec, 3.93 MB]
session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter -         [warning]
headers already sent (output started at /homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:1161
[0.14 sec, 3.93 MB]
Cannot modify header information - headers already sent by (output started at                                              [warning]
/homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:725 [0.14 sec, 4 MB]
Cannot modify header information - headers already sent by (output started at                                              [warning]
/homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:726 [0.14 sec, 4 MB]
Cannot modify header information - headers already sent by (output started at                                              [warning]
/homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:727 [0.14 sec, 4 MB]
Cannot modify header information - headers already sent by (output started at                                              [warning]
/homepages/35/d157794216/htdocs/drush5/includes/drush.inc:580) bootstrap.inc:728 [0.15 sec, 4 MB]
<br />
<b>Fatal error</b>:  Call to undefined function filter_xss() in <b>/homepages/35/d157794216/htdocs/sites/s157794238.onlinehome.us/www/includes/common.inc</b> on line <b>655</b><br />
Drush command terminated abnormally due to an unrecoverable error.                                                           [error]
Error: Call to undefined function filter_xss() in
/homepages/35/d157794216/htdocs/sites/s157794238.onlinehome.us/www/includes/common.inc, line 655 [0.2 sec, 6.03 MB]

I only applied my diff to Drush from here:

"Receiving MANY "Use of undefined constant STDERR" type errors running core-cron"
http://drupal.org/node/1064690

greg.1.anderson’s picture

Status: Active » Closed (works as designed)

As noted in the issue you quoted, you are running drush in an unsupported configuration. If core-cron worked in this configuration in 6.20, that was just a coincidence. You must run drush with php-cli, not php-cgi.

mdlueck’s picture

Status: Closed (works as designed) » Active

I tested Drush also on a server with the following specs:

Ubuntu 8.04
Apache with mod_php
php-cli

The error messages running Drush before / after the 6.20 --> 6.22 are IDENTICAL to the error messages I was getting from the server which runs php as a cgi.

Therefor it is NOT because php is run as a cgi on the one server.

Someone suggested to check the Drupal file permissions. All perms are correct.

Someone suggested running drush as root. I sudo'ed the shell script which runs drush / Drupal cron, and received the same error messages.

Seems like something in the 6.22 upgrade broke drush. I am very surprised more people are not slamming into this.

Might it be due to my running with verbose drush output?

Trouble seems to start when it reaches point:
session_start() [function.session-start]: Cannot send session cookie - headers [warning]

So what is drush trying to do at this point?

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

Works for me with Drupal 6.22 and -v. Try disabling all modules; if that works, then try to isolate the module that is causing the problem.

jonhattan’s picture

Perhaps a module doing a redirect in hook_init(), as @bkosborne recently identified here: http://drupal.org/node/1140842#comment-4526230

try disabling the modules of the list obtained with drush php-eval "print_r(module_implements('init'));"

mdlueck’s picture

@greg.1.anderson: It will be a few days until I can have a copy of the site which to disable all of the modules on.

@jonhattan: Thank you for the suggestion. Still banging into issues:

$ /srv/www/drush/drush --root=/srv/www/sites/domain.org/www --uri=http://domain.org --debug php-eval "print_r(module_implements('init'));"
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.06 sec, 3.88 MB]                                               [bootstrap]
Initialized Drupal 6.22 root directory at /srv/www/sites/domain.org/www [0.07 sec, 4.77 MB]                              [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.08 sec, 4.88 MB]                                               [bootstrap]
Initialized Drupal site domain.org at sites/default [0.19 sec, 4.93 MB]                                                  [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.2 sec, 4.98 MB]                                       [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.22 sec, 4.99 MB]                                           [bootstrap]
Successfully connected to the Drupal database. [0.22 sec, 4.99 MB]                                                       [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.23 sec, 5.38 MB]                                               [bootstrap]
session_start(): Cannot send session cookie - headers already sent by (output started at                                 [warning]
/srv/www/drush/includes/drush.inc:820) bootstrap.inc:1161 [0.23 sec, 5.46 MB]
session_start(): Cannot send session cache limiter - headers already sent (output started at                             [warning]
/srv/www/drush/includes/drush.inc:820) bootstrap.inc:1161 [0.23 sec, 5.46 MB]
Cannot modify header information - headers already sent by (output started at /srv/www/drush/includes/drush.inc:820)     [warning]
bootstrap.inc:725 [0.24 sec, 6.02 MB]
Cannot modify header information - headers already sent by (output started at /srv/www/drush/includes/drush.inc:820)     [warning]
bootstrap.inc:726 [0.24 sec, 6.03 MB]
Cannot modify header information - headers already sent by (output started at /srv/www/drush/includes/drush.inc:820)     [warning]
bootstrap.inc:727 [0.24 sec, 6.03 MB]
Cannot modify header information - headers already sent by (output started at /srv/www/drush/includes/drush.inc:820)     [warning]
bootstrap.inc:728 [0.24 sec, 6.03 MB]

Fatal error: Call to undefined function filter_xss() in /srv/www/sites/domain.org/www/includes/common.inc on line 655
Drush command could not be completed. [0.27 sec, 9.5 MB]                                                                 [error]
greg.1.anderson’s picture

Status: Postponed (maintainer needs more info) » Fixed

(deleted) Said the wrong thing; need to check my notes and put in the right solution.

greg.1.anderson’s picture

Status: Fixed » Active
greg.1.anderson’s picture

mdlueck’s picture

I disabled all of the mods (other than core) this evening on a test subdomain. Error still persists.

I just saw a post at CiviCRM complaining of the same thing with Drupal 6.22, and the suggestion was to drop back to 6.20. It seems to me that the features they tried to give us have a bug someplace.

Look at all of the posts racked up...
http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3A...

bdone’s picture

just confirming that patch mentioned in #13 clears up some drush errors. see: http://drupal.org/node/1174496#comment-4843330

drush version 4.4
d6 6.22

jonhattan’s picture

We recently get rid of drupal_error_handler at #1204862: drush up can't update D7 because of drupal error handler intervention. so it shouldn't be an issue now. Please confirm.

bdone’s picture

not sure that i can confirm, if comment #16 was intended for me. i wasn't upgrading to d7, nor was i using drush up.

but, i was receiving an error in drush output, when running the following command:

drush sql-sync @mysite.staging @mysite.localhost -y --no-cache --sanitize

in my setup, that error didn't begin occurring until a recent core upgrade from 6.x to 6.22.
the following patch removed the error: http://drupal.org/node/1174496#comment-4629384

mdlueck’s picture

Indeed: http://drupal.org/node/1174496#comment-4629384 resolved this error for us.

I think this issue may safely be closed now.

greg.1.anderson’s picture

Title: Upgrade from D6.20 to 6.22 breaks Drush's ability to run core-cron » Upgrade from D6.20 to 6.22 breaks some drush functions due to filter-xss bug
Status: Active » Reviewed & tested by the community

Marking as 'reviewed & tested', but leaving open until above core patch is committed in Drupal.

brunorios1’s picture

subscribing

greg.1.anderson’s picture

Status: Reviewed & tested by the community » Fixed

#1174496: WSOD: drupal_error_handler() assumes filter_xss() is defined has been committed, and should be part of Drupal 6.23 when it is released in early February. Marking this as 'fixed'.

mdlueck’s picture

Confirmed: Just finished up applying D6.24 on all sites. Works successfully with Drush on both php-cli and php-cgi.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.