Is't possible to get list of all session_id
in PHP SESSIONS?
Note: I need maintained some file in the server. One file equal one session. And I need to determine behaviour of old files if SESSION expire.
Thank you all for any advice.
As others have answered, sessions are stored in the path defined by session.save_path
in php.ini
and you can iterate this directory to retrieve a list of every session.
An alternative approach would be to change the session storage and move it to a database using session_set_save_handler()
. You could store all your sessions in a database and do with it whatever you wish.