Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ArchStanton's avatar

L4 -session seem to restart their lifefepan after refresh

Hi,

In my sessions.php I have the following code.

'lifetime' => 1,

However it seems I can make this last forever by hitting refresh before the minute is up.

Is this a bug or is there a way to override this?

0 likes
4 replies
pmall's avatar

The session lifetime is 1 min so yes if you refresh the page before 1 min it keeps going.

What do you want to achieve here ?

ArchStanton's avatar

Ideally if someone leave a certain page their session is destroyed.

pmall's avatar

isn't it the purpose of the expire_on_close config param ?

Please or to participate in this conversation.