sess_count() seems to be wrong in 5.x
I just installed drupal on my site a few days ago and I think there is something wrong with the sess_count() function. Either that or my site just went up in popularity by 20x over night! lol.
My "who's online" reads:
Who's online
There are currently 1 user and 19 guests online.
Online users
Somethin there just isnt right. I know there are not 19 guests online.
Here is my phpMyAdmin output of the query it ran:
Showing rows 0 - 19 (20 total, Query took 0.0005 sec)
SQL query:
SELECT *
FROM sessions
WHERE timestamp >=1188331791
AND uid =0
LIMIT 0 , 30
---I wont show the actual rows, here but I'll explain them
In the above query, I got 4 real sessions (4 that had IP's, one of them was my own) and the rest all had blank IP addresses. I assume those would be crawlers like google/yahoo etc? Maybe the DB is wrong and there shouldnt be any without IPs in them, I dont know. I dont know how Drupal works well enough to know what should and shouldnt be in the sessions table.
In the function I can see it counts the number of sessions for anonymous users, which seems to be right except for one thing. It's also counting sessions that have a blank IP address. Sessions with no IP's are usually search engines or no? If so, why is it considering these as sessions.
So can someone clarify what, if anything is wrong here? Maybe the blank IP's or wrong, or maybe it shouldnt be counting the blank IP entries. Either way, I'm sure something is wrong.
