Finding current PHP sessions
| From: | Bogdan Stancescu | Date: | Fri, 13 May 2005 08:01:11 +0000 |
| Subject: | Finding current PHP sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-215121@lists.php.net to get a copy of this message | ||
Hello all,
I guess this comes up once in a while, does anybody know how I can find the current PHP sessions' IDs? I don't mind if some have passed away, and the PHP gc hasn't run yet, because I'm doing a garbage collection of my own, for data identified by session ID -- it doesn't really matter if I keep a few obsolete files for a while, it only matters that I delete them at some point in the future.
I know I could read the session files themselves, but I'd very much rather use a "proper" way to retrieve the active sessions, which would work with alternate methods of storing session data, if there is any such proper way to do this.
I read the PHP documentation regarding sessions, and I checked out Google, with no luck. If you guys don't have a solution, it means that there is none -- in other words, you're my last hope, help! :-)
Cheers,
Bogdan