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

Pixellius's avatar

Passing values from old session to new session

Hey all,

I'm not sure if this is the right place to ask but here's my question anyways. I want to pass a value from an old session to a new session after the session times out. Is it possible? If so how would i go about doing that?

0 likes
2 replies
RamjithAp's avatar

Instead copying from old to new try extending the session time in config/session.php

'lifetime' => 120,

Or if you want to achieve same as you want to try this, run CRON job or Task Schedule which will run every minute and find out nearly expiring sessions and then renew it.

Pixellius's avatar
Pixellius
OP
Best Answer
Level 1

Never mind i stored the data i needed from the session in a cookie and retrieved the info i needed from the cookie thanks anyway @RamjithAp

Please or to participate in this conversation.