Page 1 of 1
Session Count
Posted: Tue Feb 24, 2004 7:56 pm
by Shendemiar
Is there a easy way to know how many active sessions there are, when servers sessions folder is not accesseble?
Posted: Tue Feb 24, 2004 8:29 pm
by markl999
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]).
Posted: Wed Feb 25, 2004 9:52 am
by Shendemiar
Ok i take it then that the folder is accessible, and i suppose that the host has it per user settings, so it's not common to everybody, but i will have to check it.
And as it is accessible, i take it that by examining the session files i can get a list of users & guests online.
Posted: Wed Feb 25, 2004 11:28 am
by Shendemiar
At my host's sessionfolder there are lots of files, and i have only access to those that are my sessions.
With what can i check if i have access to a file?
Posted: Wed Feb 25, 2004 11:29 am
by Shendemiar
fileperms