summaryrefslogtreecommitdiff
path: root/includes/helper/session_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/helper/session_helper.php')
-rw-r--r--includes/helper/session_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/helper/session_helper.php b/includes/helper/session_helper.php
index 4063ff69..443701ee 100644
--- a/includes/helper/session_helper.php
+++ b/includes/helper/session_helper.php
@@ -9,7 +9,7 @@
*/
function session_lifetime($lifetime, $application_name) {
// Set session save path and name
- $session_save_path = rtrim(session_save_path(), '/') . '/' . $application_name;
+ $session_save_path = '/tmp/' . $application_name;
if (! file_exists($session_save_path))
mkdir($session_save_path);
if (file_exists($session_save_path))
@@ -22,7 +22,7 @@ function session_lifetime($lifetime, $application_name) {
ini_set('session.gc_divisor', 100);
// Cookie settings (lifetime)
- ini_set('session.cookie_secure', ! (preg_match("/^localhost/", $_SERVER["HTTP_HOST"]) || isset($_GET['debug'])));
+ ini_set('session.cookie_secure', ! (isset($_SERVER['HTTP_HOST']) && preg_match("/^localhost/", $_SERVER["HTTP_HOST"]) || isset($_GET['debug'])));
ini_set('session.use_only_cookies', true);
ini_set('session.cookie_lifetime', $lifetime * 60);
}