I'm running CiviCRM 4.7.23 and Wordpres 4.8.1 on Pantheon. I'm trying to enable the CiviCRM cron.php file, but it always fails with the following error:

Warning: session_start(): user session functions not defined in /srv/bindings/cde89e363bd8463fad1497362c156c13/code/wp-content/plugins/civicrm/civicrm/CRM/Core/Session.php on line 127

Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /srv/bindings/cde89e363bd8463fad1497362c156c13/code/wp-content/plugins/civicrm/civicrm/CRM/Core/Session.php on line 127

Using a browser, CiviCRM and Wordpress run fine, and I can run the Scheduled Jobs using the Admin menu in CiviCRM.

I've installed the wp-native-php-sessions plugin for Wordpress from Pantheon and installed it as a mu-plugin so that is runs as early as I can get it to run. I also found some examples of this issue in the various scripts in the extern/ directory, and tried the same solution, to use the ini_set('sessions.save_handler', 'files') call, but that doesn't work. Then I get errors about the sessions already being active.

Does anyone have any ideas on how to get cron running for a Pantheon install of WP/CiviCRM? Or any other insight on how to resolve this so I can use the URL method of cron?

Using something like php cli or wp-cli is not really an option with Pantheon, so I need to figure out how to get the URL method working. One other option would be a way to fire the CiviCRM cron from WP cron.

  • See also: This question and search issues.civicrm.org for Pantheon (eg CRM-17212). For Drupal sites, Pantheon use Drupal's session storage, and calling scripts directly without a CMS bootstrap seems to not be a supported use on their platform. Similar may apply to their WordPress hosting. Sep 10 '17 at 3:54
  • @ChrisBurgess I have already reviewed the issues and posts you mentioned, and I tried those options. As I said in my original question, trying to do the ini_set() option to change the session.save_handler as was done for the ipn extern scripts for example also fails. Is no one running CiviCRM on WP on Pantheon? Is there a way to have the cron.php initiate the WP bootstrap? Sep 10 '17 at 19:56
  • 1
    In theory it should be possible to have WordPress cron call CiviCRM cron, at which point you should have things arranged correctly to keep WordPress, Civi, PHP and Pantheon happy. In practice - IDK if this has already been implemented, or if this is how things work today. You could raise your question in CiviCRM chat's WordPress channel if you wanted? Sep 11 '17 at 1: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.