Re: Active PHP Sessions

From: Date: Fri, 07 May 2004 13:17:33 +0000
Subject: Re: Active PHP Sessions
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-185611@lists.php.net to get a copy of this message
From: "Jason Wong" <php-general@gremlins.biz> > i) There is no way to determine which session files are for your site without > actually examining their contents. > > ii) PHP does not store any site identification info in the session files. > > iii) Hence you need to store a (hopefully) unique string in all your sessions > then search for this string in the session files. You have the option of using session_save_path() and using a directory of your own to store the session files. Then the "active" session count is just a count of how many files exist in that directory. You have to implement your own garbage cleanup of the session files, though. ---John Holmes...

« previous php.general (#185611) next »