I would like to bounce all users out of my database.. it would be so nice to click a button to do this in the ADMIN area..
For updates and such where you don't want anyone in he database. Or for those that keep it open. My database is getting very big and when all the users keep their windows open it slows down the system lately to a crawl.
I am trying to change that. Perhaps a timeout limit for each user.. like 60 minutes... would be nice.
Thanks, Tina
Bounce All Users Out of Database
Bounce All Users Out of Database
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN
Re: Bounce All Users Out of Database
Put a timer on the session, this is already shared here, and works beautifully:
http://forums.appgini.com/phpbb/viewtopic.php?f=4&t=40
I use 30 minutes.
http://forums.appgini.com/phpbb/viewtopic.php?f=4&t=40
I use 30 minutes.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: Bounce All Users Out of Database
I could be wrong but I think one single line of code in inCommon.php will achieve the same result by killing any session after a set time, defined in seconds
In inCommon.php, find the code at (around) line 54
and add
immediately above
Session Lifetime is defined in seconds, so the '1800' in the code snippet above refers to 1800 seconds which is 30 minutes (change to '900' for 15 mins, etc...)
Reference: http://php.net/manual/en/function.sessi ... params.php
That should work. It works for me.
In inCommon.php, find the code at (around) line 54
Code: Select all
if(session_id()){ session_write_close(); }
@ini_set('session.save_handler', 'files');
@ini_set('session.serialize_handler', 'php');
@ini_set('session.use_cookies', '1');
@ini_set('session.use_only_cookies', '1');
@ini_set('session.cache_limiter', 'nocache');
Code: Select all
@ini_set('session.cookie_lifetime', '1800');
Code: Select all
@ini_set('session.save_handler', 'files');
Reference: http://php.net/manual/en/function.sessi ... params.php
That should work. It works for me.
Re: Bounce All Users Out of Database
That is great for keeping them from staying logged in.. but what if I want to do an update and make sure a user is not half way through a record. It would be nice to give them a 5 minute warning and then boot them out giving them a chance to complete the changes to a record or a new entry and then log off themselves. If they don't log off it would automatically log them off.
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN
Re: Bounce All Users Out of Database
I posted the same feature suggestion about a year ago : http://forums.appgini.com/phpbb/viewtopic.php?f=6&t=20
I still think it would be great to do this. Hope Ahmad catches up with his backlog and manages to get to some of these nice to have features as well.
I still think it would be great to do this. Hope Ahmad catches up with his backlog and manages to get to some of these nice to have features as well.