Re: Re: Total Server Sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Additionally you can check the access time to see which of those
sessions has been accessed in the last, let's say, 10 minutes or
something.

But there are several problems with this.  Relying on session files is
not good enough, they might be stored in a database or in shared memory.
Other problem is that those sessions are for every PHP app installed in
the server so you are counting sessions for different apps like it were
from yours.

To solve this you could put some APPID in the session and check for its
value reading the sess file as text.  Obviously you will have to figure
out the format a little bit.


-William


El lun, 03-01-2005 a las 08:25 -0700, Rob Adams escribió:
> "HarryG" <harry1980@xxxxxxxxx> wrote in message 
> news:20050103120421.74985.qmail@xxxxxxxxxxxxxxx
> > Is there an easier way to count the total number of sessions running on a
> > PHP webserver? something like session_count();
> 
> If you're using file based sessions, you could count the number of files in 
> the directory where the sessions get saved.  If there are files in there 
> other than just session files, you'll have to look for just the session 
> files.  On all my systems, they've started with "sess."
> 
>   -- Rob 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux