Login Timeout time?

That is strange, it feels like it is much shorter then 7200 seconds. Maybe 30 minutes but to be fair I haven’t actually timed it. I will try and time it and see.

I will try the $cookieTime later tonight.

In future is that sessionExpiration a variable I change with the Docker setup? That what I am using right now.

Thanks for your help.

Yes, all variables within the config file can be updated. In this case it would be LEAN_SESSION_EXPIRATION

Perfect. I will give that a try when the next update comes out.

Thanks again for your help.

1 Like

Hello,
Did it worked ?
Because I’ve 28800 set (8 hours), and my session keeps logging me out at very (short) frequent intervals.
Thanks for your feed back.
Regards,
Ema

Dear Marcel, I am using a self hosted version of leantime 2.1.4. however now matter what i do i cannot achieve a longer session.
I have edited all possible files, everything that is mentioned in the forums ( session.gc_maxlifetime, $sessionExpiration etc), and my php.ini files are set to 288000 (80 hours) but i keep getting disconnected at what seems to be 1440 secs.
Any ideas please
thank you
Alkis

Hi,

Were you able to find a solution for your problem? Do you have any other garbage collection running? Are you using a docker container or a server?

Hello, I am using a server.

All php.ini and .htaccess, config etc files as well as the domain TTL values are set to 288000.

I have been looking into the core classes but whatever i have changed (which i do not want to be drastic) doesn’t make any difference.

is there something i am missing?

Any help will be greatly appreciated.

thanks

One more thought did you update both gc_maxlifetime and cookie_lifetime? (You only mentioned the gc_maxlifetime above)
( session.gc_maxlifetime and session.cookie_lifetime )

No I hadn’t. I just created an entry from multiphp ini editor in cpanel. i will test and revert.

thank you for your responses,

really appreciated.

unfortunately it didn’t work, i have run out of ideas.

please share any thoughts

thanks a lot

Unfortunately I am at a loss.
Reaching here: Are you sure the php sessions directory is writable by your container?

do you mean permissions and directory ownership?
leantime directory?

it is default.
is there a specific setting i should switch the folders and files to?

is there a way to intervene at the code to completely remove cookie time keeping?
if you have any suggestions that would save me the trouble of reading through the code and disable session time keeping until i figure it out i would appreciate it.

or anything else that you may think of.

thanks for the assistance

Unfortunately there is no way to not have a cookie time. The value in the config file is the best chance from Leantime’s perspective. I believe however that there is something off with your server.

I don’t see this issue anywhere else (Docker or Server).

Can you describe your environment a little more (server, version numbers) If you are using nginx can you share that config?

Apache Version 2.4.46
PHP Version 7.3.25
MySQL Version 5.7.32
Architecture x86_64
Operating System linux

Static IP
|Perl Version|5.16.3|
|Kernel Version|3.10.0-042stab133.2|

Leantime is installed in a subdomain for example leantime.domain.com
please see below a photo with current folder and permissions
leantime folder

ownership/group are those of the admin user of the server.

all php.ini have been edited by cpanel also TTL.
server hosts a couple of other websites, i have set all php.ini .htaccess, .user.ini files with large values for cookie and session expiration as discussed.

i am not using nginx.
please let me know if there is any other detail you may need.
thanks

I forgot to mention, Linux CENTOS 7.9

Thanks. One more thing, can you create a php file and add

<?php
phpinfo();

Then post the output here.

1 Like

Once I did what you proposed with phpinfo, I noticed that I was getting different values for Local and Master (0 value for session.cookie_lifetime and 1440 value for session.gc_maxlifetime).

This was a big surprise since I had edited all php.ini settings inside the public folder and subfolders using Cpanel, as well as, manually. There was nothing else to see from Cpanel for any php.ini location.

So I ran php -i | grep php.ini in command prompt and I got the correct location of the master php.ini that had the values that needed changing.

So I changed respective settings in /opt/cpanel/ea-php73/root/etc/php.ini
(MAKE SURE TO RESTART APACHE FOLLOWING THIS) and until now (3 hours later) Leantime session has not expired which means it works.

Literature states that Local Values are in priority compared to the Master values so I shouldn’t be facing such issues, but probably this goes only if Local Values are smaller than Master Values. Also php.ini ownership in /opt/cpanel/ea-php73/root/etc/ was root/root, while for the Local files it was again an admin but not root (I do not know if this would matter anyway, i do not think so).

I believe the quest is over (fingers crossed).

I can’t thank you enough for your time and effort, we will be in touch I hope for future issues, if any.

Thanks and Best Regards
Alkis

I am glad it got resolved!
Let me know if you need anything else

1 Like

Me too!!!
Thank you so much.

Rest assured that I will if needed, hahaha

thank you Marcel

Hello Marcel hope you are fine. please have a look at the below in case you have any suggestions.
thanks
Alkis