I restarted apache,but the session doesn't expire!
That, and you could set the time-limit to minus 3600 or something.
WebDevHobo
2009-10-22 08:44:26
It will only destroy session of a specific user,but I want to destroy all!
Mask
2009-10-22 09:37:19
I want to destroy sessions of all users.
Mask
2009-10-22 09:44:46
+4
A:
Delete all files in the temporary directory defined in php.ini.
thephpdeveloper
2009-10-22 08:34:09
I believe deleting the files manually would be a solution if you need to kill all sessions at once. But I hope this is a once-in-forever situation.
Stefan Ernst
2009-10-22 08:51:03
+2
A:
If you have:
session.save_handler = files
in your php.ini file, which I believe you will by default, then session data will be stored in files. Therefore bouncing the server won't destroy them.
Andy
2009-10-22 08:43:10
+1
A:
What I ussually do when I'm developing, I create a page that unsets and destroys all sessions. So everytime I need to destoy the sessions I run the script. eg. www.example.com/destroySession.php
destroySession.php contains something like (only an example)
session_start();
unset($_SESSION['name']); //If only one session variable is used
session_destroy();
Roland
2009-10-22 08:44:53