Session extend

Can I extend or save the session?
I increased ‘SESSION_DURATION_SECONDS’ but it was discarded (iPhone Safari&Chrome).
Would like to hold it for 1-3 days if possible.
Cart add-on BL4

This isn’t user-configurable. Where did you change SESSION_DURATION_SECONDS?

Thank you for your reply.
I rewrote the PHP file directly.

Changing any code is discouraged. The settings returned by getDefines() and getSettings() can be overridden via the backlight/env.php file. To use it, rename the file backlight/env.php.skel to backlight/env.php, if you hadn’t done so previously, then either uncomment and edit an existing setting, or if not already in that file, add it.

For example, to set the SESSION_DURATION_SECONDS to 86400, change env.php so that the top of it looks like this:



 * Block redirection from http to https.
 * Enable below if you have configured your site to provide automatic redirection and have encountered issues with https.

//define('BLOCK_HTTPS_REDIRECTION', true);

Having said that, session duration in PHP is more of an art than a science, and I’m not surprised that increasing this value hasn’t had the desired effect. Our sessions aren’t designed to last for days.

1 Like

I understand.
The problem that was only occurring on the iPhone seems to be reset on the OS side(when on long sleep?).