Session Count
Moderator: General Moderators
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
Session Count
Is there a easy way to know how many active sessions there are, when servers sessions folder is not accesseble?
If the servers session.save_path isn't accessible then how are you setting sessions?
If you can store a session (using files) on the server then you can read the session folder..
echo count(glob(ini_get('session.save_path').'/*')); would tell you how many files are in that folder, but course, you then need to check which of those are session files if it's not a dedicated sessions folder and also which sessions are 'yours' if you're on a shared host (they might lump them all together in one folder ... which would be Bad[TM]).
If you can store a session (using files) on the server then you can read the session folder..
echo count(glob(ini_get('session.save_path').'/*')); would tell you how many files are in that folder, but course, you then need to check which of those are session files if it's not a dedicated sessions folder and also which sessions are 'yours' if you're on a shared host (they might lump them all together in one folder ... which would be Bad[TM]).
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am