bluesteam Posted September 15, 2021 Share Posted September 15, 2021 (edited) Hello, One thing that frustrates me endlessly about WHMCS is the short timeout session when logged in to the dashboard. After a while I will do a search on the top right and then it tells me that my session has expired. Refreshing the page refreshes the session without having to login again but this can be a real PITA. After doing some research on google, other people have also complained about this and was just told to increase the php session timeout setting on the hosting account but then this will apply to ANY PHP script session running on my hosting account. If I'm not mistake, this specific php value is the session.gc_maxlifetime value. I do know I can set a dedicated php.ini in my whmcs directory ONLY but then any custom plugins that have automated tasks will have the same session timeout. Not that it is a big deal but I don't want to set a 3hour timeout on my php sessions just so that I don't have to refresh my whmcs so often. Is there really no way to implement a session timeout just for the whmcs dashboard only? Edited September 15, 2021 by bluesteam 0 Quote Link to comment Share on other sites More sharing options...
string Posted September 15, 2021 Share Posted September 15, 2021 As you know, the common procedure would be to adjust php.ini. I don't see any resulting issue with plugins or similar due to the lifetime increase. If you don't want to do that, the only alternative I can think of would be an AJAX request in the background to keep the session active. This would work by having your browser send a request to the server every few minutes via AJAX so that the session doesn't expire. But this requires that you always keep the tab open in the browser. A hook to accomplish this is quickly created. If this is an option for you, let me know. 0 Quote Link to comment Share on other sites More sharing options...
bluesteam Posted September 15, 2021 Author Share Posted September 15, 2021 3 minutes ago, string said: As you know, the common procedure would be to adjust php.ini. I don't see any resulting issue with plugins or similar due to the lifetime increase. If you don't want to do that, the only alternative I can think of would be an AJAX request in the background to keep the session active. This would work by having your browser send a request to the server every few minutes via AJAX so that the session doesn't expire. But this requires that you always keep the tab open in the browser. A hook to accomplish this is quickly created. If this is an option for you, let me know. Sure but it just feels like this is not the best solution to a problem like this. The dashboard should have a separate timout to the rest of your scripts running in a location. I guess it's just my opinion though. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.