Osclass Support Forums

Osclass plugin support => Free Osclass Plugins => Facebook Login Plugin => Topic started by: Carlos Carcamo on February 14, 2018, 05:22:03 PM

Title: How to extend the session time
Post by: Carlos Carcamo on February 14, 2018, 05:22:03 PM
Hey guys I just want to know how to extend the session time
Title: Re: How to extend the session time
Post by: MB Themes 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).
Title: Re: How to extend the session time
Post by: firesale 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.
Title: Re: How to extend the session time
Post by: MB Themes on July 13, 2018, 10:53:11 AM
@firesale
config.php in root
Title: Re: How to extend the session time
Post by: MvdO79 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!
Title: Re: How to extend the session time
Post by: MB Themes on August 10, 2021, 08:52:07 AM
Best way is to check "remember me" to save your session into cookies.
Title: Re: How to extend the session time
Post by: MvdO79 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.
Title: Re: How to extend the session time
Post by: MB Themes 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
Title: Re: How to extend the session time
Post by: MvdO79 on August 11, 2021, 08:54:51 PM
Thanks, it can be any off those factors then, so will further test this.