joon1
July 12, 2019, 10:40am
1
I like to echo all sessions which are alive at the moment.
echo list($session_alive);
The code above doesn’t work correctly but I hope it shows what I want, And the below is the result what I want.
result
session1=1
session2=‘mySession’
session3=‘aaa’
etc;
session1 , session2, and session3 are the session names and “1”, ‘mySession’, and “aaa” are their value;
How can I make the php page echoing all session list which are alive at the moment?
igor_g
July 12, 2019, 10:46am
2
I think it’s impossible (or too complex) with standard PHP sessions mechanism. So you should to save your sessions in RDB and regularly refresh them by any user request. Then you would be able to select not expired sessions
Can it be done? Yes.
Is it too difficult? Not really.
Should you do it? No.
You should probably define your use case a bit better; there are exceedingly few situations in which you would want to access this information.
system
Closed
October 11, 2019, 6:24pm
4
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.