Introduced PHP_SESSION_PATH define to avoid session deletions by other scripts.
authoranuko <support@anuko.com>
Sun, 12 Nov 2017 17:19:21 +0000 (17:19 +0000)
committeranuko <support@anuko.com>
Sun, 12 Nov 2017 17:19:21 +0000 (17:19 +0000)
WEB-INF/config.php.dist
WEB-INF/templates/footer.tpl
initialize.php

index 55f3474..3cfbb07 100644 (file)
@@ -112,6 +112,12 @@ define('WEEKEND_START_DAY', 6);
 // define('PHPSESSID_TTL', 86400);
 
 
+// PHP_SESSION_PATH
+// Local file system path for PHP sessions. Use it to isolate session deletions
+// (garbage collection interference) by other PHP scripts potentially running on the system.
+// define('PHP_SESSION_PATH', '/tmp/timetracker'); // Directory must exist and be writable.
+
+
 // Forum and help links from the main menu.
 //
 define('FORUM_LINK', 'https://www.anuko.com/forum/viewforum.php?f=4');
index 823659e..0f14b90 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.12.2.3683 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.12.3.3684 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 1a508e9..c9a4245 100644 (file)
@@ -84,6 +84,12 @@ session_cache_expire(1);
 $phpsessid_ttl = defined('PHPSESSID_TTL') ? PHPSESSID_TTL : 60*60*24;
 // Set lifetime for garbage collection.
 ini_set('session.gc_maxlifetime', $phpsessid_ttl);
+// Set PHP session path, if defined to avoid garbage collection interference from other scripts.
+if (defined('PHP_SESSION_PATH')) {
+  ini_set('session.save_path', PHP_SESSION_PATH);
+  ini_set('session.gc_probability', 1);
+}
+
 // Set session cookie lifetime.
 session_set_cookie_params($phpsessid_ttl);
 if (isset($_COOKIE['tt_PHPSESSID'])) {