Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens if I never end session in php

I'm curious about what will happen if I don't limit the session time out.

Will it affect the server?

is it considered as bad practice? if yes, why?

thank you. :)

like image 427
Dray Avatar asked Dec 24 '15 13:12

Dray


1 Answers

There's a session garbage collector than normally runs periodically and cleans up old sessions. There are php.ini parameters that control how old a session has to be deleted.

How the PHP Session Garbage Collector Really Works

like image 58
Barmar Avatar answered Oct 08 '22 20:10

Barmar