The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Early timeout for logged in user - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Early timeout for logged in user (/showthread.php?tid=363) |
Early timeout for logged in user - Overlordv2 - 11-24-2016 Hello! First, congratulations for such a wonderful user management system. This helps my project a great deal. I am encountering an issue with a logged in user timing out early. I have set up UserSpice as follows: Linux / Ubuntu 16.04 w/ Nginx and PHP 7 UserSpice is installed in a subdirectory I am able to successfully login as a user Once I log in with that user, it automatically logs out the user after about one minute no matter what I do. It then makes me log back into the system. This happens even with the administrator account. I have double checked the Cookie timeout and it is set at the default one week. Any ideas for fixing this? Thanks! Early timeout for logged in user - mudmin - 11-24-2016 Thanks for the compliments. We've used both PHP7 and NginX but I'm trying to think if we've used them together. Do you have any way to set your system to 5.6 and see if the same thing happens? That is a very weird problem. Does it still happen if you check the remember me box on login? Early timeout for logged in user - mudmin - 11-24-2016 You can also try adding these two lines before session_start() in the users/init.php file. I'd love to know if that makes a difference. Code: ini_set('session.gc_maxlifetime', 3600); Code: session_set_cookie_params(3600); So your first 4 lines would be... Code: <?php Code: ini_set('session.gc_maxlifetime', 3600); Code: session_set_cookie_params(3600); Code: session_start(); Early timeout for logged in user - Overlordv2 - 11-24-2016 I wasn't expecting a reply so quickly. Thanks for your A+ service. Your suggestion to "remember me" made the difference. Thanks again!! Early timeout for logged in user - mudmin - 11-24-2016 Glad I could help...but there is still some other configuration issue on your server. The remember me sets a cookie...so if you are still staying logged in, that's great, but that means there is some sort of session issue on your server. I would try to... 1. Logout. 2. Add this line to init.ini ini_set('session.gc_maxlifetime', 3600); 3. Login without remember me and see if your problem is still there. If the problem goes away, you can either leave that line there, or you might want to adjust the php.ini file to have htat maxlifetime thing there so you don't keep getting logged out on other apps. Early timeout for logged in user - Overlordv2 - 11-25-2016 I tried the second set of changes you recommended. I added the lines to init.php. However, the error recurs with this and the user gets timed out after one minute. I have confirmed that my server php.ini is properly set up and that cookies there are at least 3600 seconds long before expiration. Early timeout for logged in user - mudmin - 11-25-2016 Hmm. That's very weird. I'll have to do some looking at that. Obviously you can set the remember me by default on login as a temporary solution. Early timeout for logged in user - Overlordv2 - 11-25-2016 And here is one other interesting tidbit. There is no expiration in Safari. This problem occurs only in Chrome. Early timeout for logged in user - mudmin - 11-25-2016 Hmm. Yeah. That makes me think it is not server side... if it is on a live server, I would try accessing from another computer. I wonder if it is a chrome extension or something. |