*

Carlos Carcamo

  • ****
  • 105 posts
  • LaKompra.com
How to extend the session time
« on: February 14, 2018, 05:22:03 PM »
Hey guys I just want to know how to extend the session time
LaKompra.com

Marked as best answer by Carlos Carcamo on February 15, 2018, 06:32:27 AM
*

MB Themes

Re: How to extend the session time
« Reply #1 on: February 14, 2018, 08:06:40 PM »
@Carlos
I am using this code in config.php:
Code: [Select]
session_set_cookie_params(2592000);
ini_set('session.gc_maxlifetime', 2592000);

Works very well, however session change will throw error to logged users when it is about to expire (one time).
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

firesale

  • **
  • 15 posts
Re: How to extend the session time
« Reply #2 on: July 12, 2018, 09:55:18 PM »
@Carlos
I am using this code in config.php:
Code: [Select]
session_set_cookie_params(2592000);
ini_set('session.gc_maxlifetime', 2592000);

Works very well, however session change will throw error to logged users when it is about to expire (one time).

Is this config.php in home folder or configure.php in the plugin facebook_login\admin folder?

Thanks.

*

MB Themes

Re: How to extend the session time
« Reply #3 on: July 13, 2018, 10:53:11 AM »
@firesale
config.php in root
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MvdO79

  • ***
  • 32 posts
Re: How to extend the session time
« Reply #4 on: August 10, 2021, 12:33:18 AM »
This is a long time ago but I experience to have to login again and again, in the website root I changed the config.php to:

Code: [Select]
// Increase default login time for user
session_set_cookie_params(2592000);
ini_set('session.gc_maxlifetime', 2592000);

Is this problem solved and is my problem something else like hosting settings or the fact I am logged in as admin, or having the maintenance option set to on right now?

Thanks!

*

MB Themes

Re: How to extend the session time
« Reply #5 on: August 10, 2021, 08:52:07 AM »
Best way is to check "remember me" to save your session into cookies.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MvdO79

  • ***
  • 32 posts
Re: How to extend the session time
« Reply #6 on: August 11, 2021, 12:38:44 AM »
Yeah I do so, but that won't solve it. I am logging in as admin through the oc-admin and have maintenance activated.

*

MB Themes

Re: How to extend the session time
« Reply #7 on: August 11, 2021, 08:51:08 AM »
Not sure if that has impact, but there are 2 things to remember:
- browser may try to "secure" you and will cut cookies & sessions as much as possible
- when you login in different browser, it may log you out in another ones
- when you login into oc-admin, it may log you out from front
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MvdO79

  • ***
  • 32 posts
Re: How to extend the session time
« Reply #8 on: August 11, 2021, 08:54:51 PM »
Thanks, it can be any off those factors then, so will further test this.