diff options
author | Felix Favre <felix.favre@protonet.info> | 2015-08-26 13:33:38 +0200 |
---|---|---|
committer | Felix Favre <felix.favre@protonet.info> | 2015-08-26 13:33:38 +0200 |
commit | 8c1f6d2c9c36d84bff629e4bd1e1fdbbe4b83d76 (patch) | |
tree | 51b66d800bb2f3e8b4ff5681ee25db0bbfe007f6 /includes/helper | |
parent | ab50115746af0bbd90df3993459c7b10e427c9ac (diff) |
removed sessionhelper. we should let this handle the server administrator within the PHP config
Diffstat (limited to 'includes/helper')
-rw-r--r-- | includes/helper/session_helper.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/includes/helper/session_helper.php b/includes/helper/session_helper.php deleted file mode 100644 index 443701ee..00000000 --- a/includes/helper/session_helper.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * Set lifetime of php session. - * - * @param int $lifetime - * Lifetime in minutes - * @param string $application_name - * Name of the application - */ -function session_lifetime($lifetime, $application_name) { - // Set session save path and name - $session_save_path = '/tmp/' . $application_name; - if (! file_exists($session_save_path)) - mkdir($session_save_path); - if (file_exists($session_save_path)) - session_save_path($session_save_path); - session_name($application_name); - - // Set session lifetime - ini_set('session.gc_maxlifetime', $lifetime * 60); - ini_set('session.gc_probability', 1); - ini_set('session.gc_divisor', 100); - - // Cookie settings (lifetime) - 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); -} - -?>
\ No newline at end of file |