nuBuilder - unwanted logout

Questions related to using nuBuilder Forte.

Re: nuBuilder - unwanted logout

Unread postby Janusz » Wed Oct 14, 2020 5:25 pm

Normally in header should be fine. It has to be just started in one place.
additonally in code the following : nuRunPHPHidden('my_time');
should be replaced by: nuRunPHPHidden('my_time','x');
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
 
Posts: 468
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland
nuBuilder Version: 4.5

Re: nuBuilder - unwanted logout

Unread postby treed » Thu Oct 15, 2020 6:58 am

Here is some info about settings in your PHP.INI file.

PHP and sessions: Very simple to use, but not as simple to understand as we might want to think.

session.gc_maxlifetime
This value (default 1440 seconds) defines how long an unused PHP session will be kept alive. For example: A user logs in, browses through your application or web site, for hours, for days. No problem. As long as the time between his clicks never exceed 1440 seconds. It's a timeout value.

PHP's session garbage collector runs with a probability defined by session.gc_probability divided by session.gc_divisor. By default this is 1/100, which means that above timeout value is checked with a probability of 1 in 100.

session.cookie_lifetime
This value (default 0, which means until the browser's next restart) defines how long (in seconds) a session cookie will live. Sounds similar to session.gc_maxlifetime, but it's a completely different approach. This value indirectly defines the "absolute" maximum lifetime of a session, whether the user is active or not. If this value is set to 60, every session ends after an hour.

So PHPINFO.PHP reported the default value of session.gc_maxlifetime at 1440 seconds for my system. I've upped this to 14400, at that point users deserve to be logged out. We'll see if it works.
treed
 
Posts: 100
Joined: Mon May 18, 2020 7:32 am

Re: nuBuilder - unwanted logout

Unread postby treed » Thu Oct 15, 2020 7:55 am

This appears to have worked!
treed
 
Posts: 100
Joined: Mon May 18, 2020 7:32 am

Re: nuBuilder - unwanted logout

Unread postby Janusz » Thu Oct 15, 2020 6:11 pm

For sure this setting can help.
In my case I have default values 1440 (24minutes).
Even though very often I observed that connection was lost even after some minutes.

From my observation it can change from network to network and can be related as well to network routers settings.
For example when I open Linux terminal to the same server from one network I can have it active for hours.
but with the same configuration from the other network I can have connection broken after some minutes of inactivity - but sometimes can stay long connected.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
 
Posts: 468
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland
nuBuilder Version: 4.5

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 14 guests

cron