Jump to content
bluesteam

Session timeout increase

Recommended Posts

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 by bluesteam

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated