Re: [PHP] List of sessions

2006-05-06 Thread Richard Lynch
On Sat, May 6, 2006 9:42 am, tedd wrote: > While we're on the subject of listing sessions, what does the > following code do? Looks like it snoops through all the sessions it can find. I suspect it will also NUKE the last session, where 'last' is whatever order readdir() feels like returning, whi

Re: [PHP] List of sessions

2006-05-06 Thread chris smith
On 5/7/06, tedd <[EMAIL PROTECTED]> wrote: Hi: While we're on the subject of listing sessions, what does the following code do? session_start(); $path = ini_get('session.save_path'); $handle = dir($path); while ($filename = $handle->read()) { if (substr($filename, 0, 5) == '

Re: [PHP] List of sessions

2006-05-06 Thread tedd
Hi: While we're on the subject of listing sessions, what does the following code do? session_start(); $path = ini_get('session.save_path'); $handle = dir($path); while ($filename = $handle->read()) { if (substr($filename, 0, 5) == 'sess_') {

Re: [PHP] List of sessions

2006-05-06 Thread Richard Lynch
On Thu, May 4, 2006 10:56 pm, Tony Aldrich wrote: >> >> Honestly, the easiest way to solve this is to switch to 'user' PHP >> sessions: >> http://php.net/session-set-save-handler > > > Thanks. I'm trying now to do this. > I'm wondering about "session-set-save-handler" - what is "manual > garbage >

Re: [PHP] List of sessions

2006-05-04 Thread Tony Aldrich
Honestly, the easiest way to solve this is to switch to 'user' PHP sessions: http://php.net/session-set-save-handler Thanks. I'm trying now to do this. I'm wondering about "session-set-save-handler" - what is "manual garbage collector" here? It means I must explicitly "unset" all variables or

Re: [PHP] List of sessions

2006-05-04 Thread Richard Lynch
On Wed, May 3, 2006 11:29 pm, Tony Aldrich wrote: > Well, I mean visitors of site. They can open it in several windows or > in > several browsers. I understand that each browser on a machine will be > a > session (in simple explanation). And for all of them I create some > info in > database. Then

Re: [PHP] List of sessions

2006-05-04 Thread Tony Aldrich
Thanks all for explanations. I'll try to use callback functions. Tony. On 5/4/06, Joe Wollard <[EMAIL PROTECTED]> wrote: If you store your sessions in a database then your could gain a little mode control over your session, but I think what you're asking is if there's a way to tell if a user h

Re: [PHP] List of sessions

2006-05-03 Thread Joe Wollard
If you store your sessions in a database then your could gain a little mode control over your session, but I think what you're asking is if there's a way to tell if a user has closed the browser thus killing the session on their side. If that's what you're asking then the answer is not going to li

Re: [PHP] List of sessions

2006-05-03 Thread Tony Aldrich
Well, I mean visitors of site. They can open it in several windows or in several browsers. I understand that each browser on a machine will be a session (in simple explanation). And for all of them I create some info in database. Then they close browser. I must clean up unused info. That's why I w

[PHP] List of sessions

2006-05-02 Thread Tony Aldrich
Good day, Does anybody know how to get a list of current sessions? I need to clear some database rows that where associated with some SID. Can it be done without probing of maxlifetime? Thanks in advance. Tony.