I am using CiviCRM 5.23.4 with Drupal 7.69, though this issue is not new to this version of Civi.

Every time Civi cron runs, I get a warning in the Drupal Recent log messages:

Warning: session_set_save_handler(): Cannot change save handler when session is active in drupal_session_initialize() (line 242 of /home/XXXX/www/www/includes/session.inc).

Any suggestions for how to address this would be appreciated. Thanks.

  • 1
    What version of php? Not the one listed at /admin/reports/status but the one that cron actually uses. If you aren't sure put watchdog('test', phpversion()); in line 241 in includes/session.inc and then check what it puts in the drupal log. – Demerit Mar 25 at 18:32
  • Good question. 7.2.28 – The Amateur Mar 25 at 20:44
  • 1
    That should be ok, and in fact you maybe started seeing the messages whenever you started with php 7.2. Anything session-related in civicrm.settings.php? Or an extension? Although it seems like that line would run earlier before civi starts. I guess you don't see the message when it's just regular drupal cron running? – Demerit Mar 25 at 20:56
  • Thanks for helping me out with this Demerit. It only happens when Civi cron runs, not when drupal cron runs. I wouldn't know what to look for in terms of "anything session-related". And I'm also not sure what you mean about extensions. Sorry, I'm an amateur with this stuff :-) – The Amateur Mar 25 at 21:04
  • For extensions I mean in civicrm under Administer - System Settings - Manage Extensions. But my guess right now is that it's not actually drupal 7.69 and is maybe only partially upgraded and maybe still has files from 7.67? Or a non-standard drupal module is causing it, on the drupal side under admin - modules. Except then you would probably see it for drupal cron, but maybe civi causes an extra call or something. I'm not really sure here. – Demerit Mar 25 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.