From ba1e1ab6e1c5e5f52befbf66eeb6aaa72cd45df6 Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Sat, 12 Sep 2015 22:41:27 +1200 Subject: [PATCH] CRM-17212: Use pantheon detection to switch file session to storage --- extern/authorizeIPN.php | 4 +++- extern/googleNotify.php | 2 +- extern/ipn.php | 2 +- extern/pxIPN.php | 2 +- extern/rest.php | 2 +- extern/soap.php | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/extern/authorizeIPN.php b/extern/authorizeIPN.php index 84765452a4..65569d38f8 100644 --- a/extern/authorizeIPN.php +++ b/extern/authorizeIPN.php @@ -31,7 +31,9 @@ * $Id$ */ -ini_set('session.save_handler', 'files'); +if (defined('PANTHEON_ENVIRONMENT')) { + ini_set('session.save_handler', 'files'); +} session_start(); require_once '../civicrm.config.php'; diff --git a/extern/googleNotify.php b/extern/googleNotify.php index 95d4acd969..46dda09188 100644 --- a/extern/googleNotify.php +++ b/extern/googleNotify.php @@ -31,7 +31,7 @@ * $Id$ */ -if (!empty($_SERVER['PRESSFLOW_SETTINGS'])) { +if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } session_start(); diff --git a/extern/ipn.php b/extern/ipn.php index a7f56d10b1..696e5773d8 100644 --- a/extern/ipn.php +++ b/extern/ipn.php @@ -31,7 +31,7 @@ * $Id$ */ -if (!empty($_SERVER['PRESSFLOW_SETTINGS'])) { +if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } session_start(); diff --git a/extern/pxIPN.php b/extern/pxIPN.php index e1d6f063be..1c4ab281e8 100644 --- a/extern/pxIPN.php +++ b/extern/pxIPN.php @@ -10,7 +10,7 @@ * in creating this payment processor module */ -if (!empty($_SERVER['PRESSFLOW_SETTINGS'])) { +if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } session_start(); diff --git a/extern/rest.php b/extern/rest.php index b944dba5bc..601f1cd980 100644 --- a/extern/rest.php +++ b/extern/rest.php @@ -28,7 +28,7 @@ require_once '../civicrm.config.php'; $config = CRM_Core_Config::singleton(); -if (!empty($_SERVER['PRESSFLOW_SETTINGS'])) { +if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } session_start(); diff --git a/extern/soap.php b/extern/soap.php index f50939a906..20d39f46c2 100644 --- a/extern/soap.php +++ b/extern/soap.php @@ -33,7 +33,7 @@ if (phpversion() == "5.2.2" && $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input'); } -if (!empty($_SERVER['PRESSFLOW_SETTINGS'])) { +if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } session_start(); -- 2.25.1