Hello, please don't laugh at my naive question. I desperately need to know whether it is possible to fetch/find a particular session(associated with a particular logged-in user) from all the session that the server generates(for all those users who are logged-in) at a particular point of time using the session ID or any other means & perform operations on that session like unset/destroy the session.
yes. If you set a session you should be able to get it within the session life. Thats a bit of 101 sessions to check login or whatnot.. Its been awhile, but if you want to go fancy you can dig around shell and dig up all the life sessions in a que, but hell if I remember how to do that.
You can follow these steps: - Create a phpinfo() file to display all of your php settings - Go down to the session area and look at session.save_path , this is the directory your session variables are saved in. It will show all of you session variables - Change to the directory using 'cd' on the command line - Try something like this: ls *<sessionid>* . THis will list the session file associated with the session id you have - Then: cat <filename> . THis will list the contents of that session Hope this helps
Thank you for your replies. I have tried the process of deleting the session files. But refreshing the page recreates the session file immediately. Actually I need catch some active sessions using their session IDs & destroy them from outside(some users would be logged in using those sessions already, they needed to be forcibly logged out depending on some criteria). Actually I have solved the problem by saving the session related data in a table but wanted to know if there is any way around.