php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59108 Session count
Submitted: 2010-03-11 03:51 UTC Modified: 2010-03-15 02:26 UTC
From: admin at mrmunk dot dk Assigned:
Status: Closed Package: WinCache (PECL)
PHP Version: 5.3.2RC3 OS: Windows 2008 R2 Web
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
4 - 1 = ?
Subscribe to this entry?

 
 [2010-03-11 03:51 UTC] admin at mrmunk dot dk
Description:
------------
I'd like to have a function that can tell me how many sessions 
are initiated

Something like:
wincache_session_count ?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-11 12:09 UTC] don dot raman at microsoft dot com
This code should do exactly what you want:

<?php

function wincache_session_count( )
{
    $ucache_info = wincache_ucache_info();
    $count = 0;
    foreach ( $ucache_info['ucache_entries'] as $entry ) {
        if ( $entry['is_session'] )
            $count++;
    }
    return $count;
}

?>

You can use the above function till we decide on this feature request. If you can provide some context behind usefulness of the API you are asking for, it will be a good data point in our triage meeting.
 [2010-03-15 02:26 UTC] ksingla at microsoft dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

We have separated user cache and session cache. We have added a function (wincache_scache_info) to get session cache properties. count in the return value will be the session count. wincache_scache_info also accepts an optional boolean (summaryonly) which when set to true will not return individual entries.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC