Body: <p>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:</p>
  <blockquote>
  <p>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</p>
  <p>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</p>
  </blockquote>
  <p>Using a browser, CiviCRM and Wordpress run fine, and I can run the Scheduled Jobs using the Admin menu in CiviCRM.</p>
  <p>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.</p>
  <p>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?</p>
  <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-10T03:54:12.957Z
Comments.Text: See also: [This question](https://civicrm.stackexchange.com/questions/4464/what-is-required-to-run-civicrm-on-pantheon) and search https://issues.civicrm.org for Pantheon (eg [CRM-17212](https://issues.civicrm.org/jira/browse/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.
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-10T19:56:25.607Z
Comments.Text: @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?
Comments.UserDisplayName: Marc Zampetti
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-11T01:14:17.777Z
Comments.Text: 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](https://chat.civicrm.org/civicrm/channels/wordpress) if you wanted?
Comments.UserDisplayName: Chris Burgess
Tags: <wordpress><cron><session>
Title: Error running cron.php on Pantheon with Wordpress
ThreadText: # Error running cron.php on Pantheon with Wordpress
  
  (Asked by: username_0 on 2017-09-10)
  
  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.
  
  **Tags:** wordpress, cron, session
  
  > **Comments:**
  > **username_1**: See also: [This question](https://civicrm.stackexchange.com/questions/4464/what-is-required-to-run-civicrm-on-pantheon) and search https://issues.civicrm.org for Pantheon (eg [CRM-17212](https://issues.civicrm.org/jira/browse/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.  
  > **username_0**: @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?  
  > **username_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](https://chat.civicrm.org/civicrm/channels/wordpress) if you wanted?  
  
  ---
  
  ## 0 answers
  
  