Firstly, to any timetracker devs here: thanks for a great piece of software. I'm new to this forum.
I managed to install timetracker v. 1.19.14.5180 on a virtual server. (Your Linux quick install howto is obviously good!)
I have an issue that despite a lot of Googling I cannot seem to fix. Timetracker keeps logging me out. Things I have tried:
In WEB-INF/config.php, I set this:
define('PHPSESSID_TTL', 259200);
This only made it worse and it was logging me out in under an hour. (Sometimes it seemed like every time I went to the browser tab I had to enter my password again.) I read this forum post:
viewtopic.php?t=1830
So I created a directory /../../../tt-tmp and set its permissions to 0755 (I also tried higher permissions). Then I uncommented the line in config.php and set it to:
define('PHP_SESSION_PATH', '/../../../tt-tmp');
That made things even worse and timetracker would not let me log in at all.
Please can anyone shed some light on this?
Timetracker keeps logging me out -SOLVED
-
- Posts: 3
- Joined: Sat Feb 29, 2020 11:47 am
Timetracker keeps logging me out -SOLVED
Last edited by raisinTweezers on Thu Apr 23, 2020 7:57 pm, edited 1 time in total.
Re: Timetracker keeps logging me out
Looks like you are on the right path here using PHP_SESSION_PATH, but apparently the specified directory is not accessible / usable, therefore you can't login. Make it accessible to PHP, then it will work properly. I would try using absolute path instead.raisinTweezers wrote: ↑Sat Feb 29, 2020 11:52 amSo I created a directory /../../../tt-tmp and set its permissions to 0755 (I also tried higher permissions). Then I uncommented the line in config.php and set it to:
define('PHP_SESSION_PATH', '/../../../tt-tmp');
That made things even worse and timetracker would not let me log in at all.
Please can anyone shed some light on this?
-
- Posts: 3
- Joined: Sat Feb 29, 2020 11:47 am
Re: Timetracker keeps logging me out
Thanks wrc. I tried creating a directory under the public_html directory and referencing that in PHP_SESSION_PATH using both absolute and relative paths, but neither worked. So I commented both the PHP_SESSION_PATH and PHPSESSID_TTL lines to revert to the default. Timetracker is now logging me out it seems every hour. That's odd as I think I read that the default is 24 hours. So I searched to find other instances of PHPSESSID_TTL, and found this in line 84 of initialize.php:
$phpsessid_ttl = defined('PHPSESSID_TTL') ? PHPSESSID_TTL : 60*60*24;
To me that looks like 24 hours, or am I wrong? What would happen if I edited that line to, say, 60*60*192? Or is there anything else I can try?
Thanks again for your help.
$phpsessid_ttl = defined('PHPSESSID_TTL') ? PHPSESSID_TTL : 60*60*24;
To me that looks like 24 hours, or am I wrong? What would happen if I edited that line to, say, 60*60*192? Or is there anything else I can try?
Thanks again for your help.
Re: Timetracker keeps logging me out
It' is not Time Tracker that logs you out. You run other applications in there that expire your sessions from a commonly shared directory. To resolve the problem, you need to keep the sessions separate.raisinTweezers wrote: ↑Tue Mar 03, 2020 10:28 am... Timetracker is now logging me out it seems every hour. That's odd as I think I read that the default is 24 hours.
See above, nothing will help until you rersolve the underlying prtoblem of other apps interfering. You need to keep TT sessions in a separate directory for every instance of TT that you may run there,raisinTweezers wrote: ↑Tue Mar 03, 2020 10:28 am$phpsessid_ttl = defined('PHPSESSID_TTL') ? PHPSESSID_TTL : 60*60*24;
To me that looks like 24 hours, or am I wrong? What would happen if I edited that line to, say, 60*60*192? Or is there anything else I can try?
Add this to initialize.php:
Code: Select all
echo session_save_path();
echo('<br>');
echo(__FILE__);
Code: Select all
// 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);
}
Code: Select all
$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);
}
echo session_save_path();
echo('<br>');
echo(__FILE__);
Or buy a support incident for quicker resolution.
-
- Posts: 3
- Joined: Sat Feb 29, 2020 11:47 am
Re: Timetracker keeps logging me out
Sorry for the delay in replying. Thank you both for your help. Peter, your instructions worked perfectly! Thanks again