To clear up confusion:
The "Who's online" block determines it by querying the sessions table. It bases it from the timestamp and interval. That time can be set in the configuration for the Who's online block.
You are dealing with stateless HTTP. By it's very nature, it's always going to be like this. Once the page is downloaded, the connection is dropped. Unless you are doing some AJAX behind the scenes, the that person can keep their browser open all night, but it will drop them as being online since they haven't done any new requests from Drupal.
With the stateless stuff, the way sites like Facebook get around it is by doing long polling/server push. Basically a connection from the browser is kept open to the server. Special server software like Comet, APE or node.js is used for this. There is tricky ways you can do this with Apache and even PHP, but you better have a ton of memory on that server given Apache's heavy memory usage.
Basically the Drupal method works for a majority of the cases. It's actually the same method used by other software, such as PHPBB and vBulletin and works with all hosting. Going something more real time is going to take some custom coding and for even better real time, a server you can install custom server software on.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 4/13/2012 12:38 PM, Don Pickerel wrote:
if you have access to the system, you could probably limit the systems TCP keep alive time. If it doesn't see activity in a certain amount of time that connection is closed and the Apache thread is released. When that's closed the session should be released as well.
-Don-
On 4/13/2012 12:32 PM, steeph wrote:
On 04/13/2012 05:48 PM, Ms. Nancy Wichmann wrote:
I don't know if it shows people after they actually bother to log out, but it might. The fact is that the list just has no connection to reality. I don't know if actually reading the Session table would be any better either.
That's right. But you can set an amount of minutes after the user's last activity. After this the user isn't displayed as "online" until the next page is called. Sure, it isn't reality, but most times it's not far from it.
If Roger wants to show such a block, views is my recommendation. If it's not accurate enough, I have no recommendation. But if hiding admin users is all that he wants to change about the display provided by core, that should do it.