Post by yogesch » Thu May 06, 2021 12:06 am

So I need to enable people to stay logged in for longer so they can continue browsing and adding to cart over multiple sittings.

I checked the files and search results, and I understand that the system/session files and php.ini file decide this.

In the php.ini file, the session.gc_maxlifetime variable is set to 3600 by default. Is it enough to change just this value?

The file system/library/session/db.php seems to be writing the session into the DB, but the $expire value is set to null by default. Does this need to be updated?

Version 3.0.3.2


New member

Posts

Joined
Wed Apr 29, 2020 1:04 am

Post by straightlight » Thu May 06, 2021 12:39 am

The session gc lifetime has been reported on the Github Opencart repository. However, for session handling, it would be in your system/config folder.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Thu May 06, 2021 12:46 am

3.0.3.2 has a bug where sessions don't expire anyway. If you were to fix that bug then changing session.gc_maxlifetime would be needed.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yogesch » Thu May 06, 2021 11:16 am

straightlight wrote:
Thu May 06, 2021 12:39 am
The session gc lifetime has been reported on the Github Opencart repository. However, for session handling, it would be in your system/config folder.
Thanks for helping out.

The relevant files in my system/config seem to be admin.php, catalog.php, default.php.

default.php has an entry for cache_expire, which is set to 3600. I can update this.

I don't see any other entry that might be useful in any of the other files in system/config. Do I need to make a new entry in any of the .php files? Or is it sufficient to just update the cache_expire value in default.php?

Version 3.0.3.2


New member

Posts

Joined
Wed Apr 29, 2020 1:04 am

Post by yogesch » Thu May 06, 2021 11:18 am

ADD Creative wrote:
Thu May 06, 2021 12:46 am
3.0.3.2 has a bug where sessions don't expire anyway. If you were to fix that bug then changing session.gc_maxlifetime would be needed.
Ok, thank you. I'll try doing this and test again.

Version 3.0.3.2


New member

Posts

Joined
Wed Apr 29, 2020 1:04 am
Who is online

Users browsing this forum: Semrush [Bot] and 248 guests