CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviMail cron job fails due to drupal bootstrap / session conflict
Pages: [1]

Author Topic: CiviMail cron job fails due to drupal bootstrap / session conflict  (Read 2177 times)

noah

  • I’m new here
  • *
  • Posts: 18
  • Karma: 4
CiviMail cron job fails due to drupal bootstrap / session conflict
January 10, 2011, 11:50:22 pm
I recently upgraded CiviCRM from version 3.1.3 to version 3.3.1. I'm running Drupal 6.20.

I have always used curl to trigger the cron job for CiviMail, like this: curl -Ss 'http://<domain>/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=<username>&pass=<password>&key=<key>

This had always worked before. After upgrading, civimail.cronjob.php fails with a fatal error. The error message is:

Quote
Sorry, could not able to load drupal bootstrap.

After some digging, I changed line 320 of CRM/Utils/System/Drupal.php:

Code: [Select]
@drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);to
Code: [Select]
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
In order to get a more detailed error message. Now the cron job generated this message:

Quote
Warning:  ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time in /path/to/my/site/sites/default/settings.php on line 134

Warning:  ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time in /path/to/my/site/sites/default/settings.php on line 136

Warning:  Cannot modify header information - headers already sent by (output started at /path/to/my/site/sites/default/settings.php:134) in /path/to/my/site/includes/bootstrap.inc on line 545

Warning:  Cannot modify header information - headers already sent by (output started at /path/to/my/site/sites/default/settings.php:134) in /path/to/my/site/includes/bootstrap.inc on line 546

Warning:  Cannot modify header information - headers already sent by (output started at /path/to/my/site/sites/default/settings.php:134) in /path/to/my/site/includes/bootstrap.inc on line 547

Warning:  Cannot modify header information - headers already sent by (output started at /path/to/my/site/sites/default/settings.php:134) in /path/to/my/site/includes/bootstrap.inc on line 548
Sorry, could not able to load drupal bootstrap.

I saw this sort of issue reported in an earlier forum post (http://forum.civicrm.org/index.php/topic,15472.msg74471.html) and issue (http://issues.civicrm.org/jira/browse/CRM-6691), but it never seems to have been resolved. Lobo directed me back to the forums after I created an issue (http://issues.civicrm.org/jira/browse/CRM-7349). Does anyone have a clue for me about this?

Thanks!
« Last Edit: January 10, 2011, 11:53:41 pm by noah »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: CiviMail cron job fails due to drupal bootstrap / session conflict
January 11, 2011, 01:24:06 am
Did you try changing the civimail user's permissions per this comment?

Quote
I have had similar trouble.  After reading several forum post on the 3.2.3 issue, I have tried making the Drupal account referenced in the civimail.cronjob.php?name=<account> a Drupal site administrator.  Now it works.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviMail cron job fails due to drupal bootstrap / session conflict
January 12, 2011, 05:44:03 am
Hi,

Got a problem that seems related, but happen with user 1 (the cron silently die).

Digging...

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

noah

  • I’m new here
  • *
  • Posts: 18
  • Karma: 4
Re: CiviMail cron job fails due to drupal bootstrap / session conflict
January 13, 2011, 04:42:41 pm
Quote from: Eileen on January 11, 2011, 01:24:06 am
Did you try changing the civimail user's permissions per this comment?

@Eileen: Yes, the civimail cron user has site admin permissions.

Tony Horrocks

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 7
    • Fabriko Limited
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7
Re: CiviMail cron job fails due to drupal bootstrap / session conflict
March 18, 2011, 02:17:32 pm
I'm now getting this error too.
Tony Horrocks
Author of the CiviCRM CookBook https://www.packtpub.com/web-development/civicrm-cookbook

alanpuccinelli

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.2
  • PHP version: 5.3.6
Re: CiviMail cron job fails due to drupal bootstrap / session conflict
November 16, 2011, 01:08:37 pm
For me the issue was that I had error reporting turned on and reporting all errors. I believe that was preventing header info from being properly seWt. When it's off the processor works perfectly.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviMail cron job fails due to drupal bootstrap / session conflict

This forum was archived on 2017-11-26.