Reputation: 34197
I restarted apache,but the session doesn't expire!
Upvotes: 14
Views: 19266
Reputation: 2781
Why not use session_destroy()
to destroy the client's session?
Upvotes: 8
Reputation: 36839
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();
Upvotes: 4
Reputation: 9048
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.
Upvotes: 5