Jump to content

Session expiration time for url parameters


Recommended Posts

I link to the following url with the included parameter to temporarily change the theme to my site. it works like a charm. But when I leave the browser open for a few mins, it deactivates and I am sent back to the theme that is set in the General Settings for the site. I have come to realize that somewhere, there is a time set that deletes the session cookie that is forcing that change. I need to know how I can either pragmatically extend that time by editing some file in whmcs, edit a setting in php to force that change for the whole site, or activate some configuration in the general settings or configuration files to make that time limit longer. What is the best way to accomplish this?

 https://www.mywebsite.com/whmcs/index.php?systpl=theme2

Link to comment
Share on other sites

  • WHMCS Technical Analyst II
On 8/9/2020 at 9:09 PM, unixcommerce said:

I link to the following url with the included parameter to temporarily change the theme to my site. it works like a charm. But when I leave the browser open for a few mins, it deactivates and I am sent back to the theme that is set in the General Settings for the site. I have come to realize that somewhere, there is a time set that deletes the session cookie that is forcing that change. I need to know how I can either pragmatically extend that time by editing some file in whmcs, edit a setting in php to force that change for the whole site, or activate some configuration in the general settings or configuration files to make that time limit longer. What is the best way to accomplish this?

 https://www.mywebsite.com/whmcs/index.php?systpl=theme2

We respect the session timeout value set in PHP on the server, and this would usually suggest that either the timeout is set too low (your system administrator can correct that) or something is causing the session to be invalidated after a few minutes. If you are running WHMCS behind a proxy/CDN, such as CloudFlare, I'd recommend adding it as a trusted proxy as described at https://docs.whmcs.com/Trusted_Proxy_Settings as an IP change usually occurs every few minutes on such services and would result in the session being invalidated as a result.

Link to comment
Share on other sites

What do I need to change in my PHP.INI. is it session.gc_maxlifetime. I have tried changing the value from 1440 to 65535 but the issue is still present. please help.

Also, is there a more clean way to implement this. is there a way I can use a different theme for mobile lets say. Not a responsive theme, but a separate theme all together for the mobile device when they go to the website. 

Edited by unixcommerce
Link to comment
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