Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Whos Online Avatar

@xp02ed

I’ve tracked down the root of the problem (at least in my case), it’s most likely that you server clocks are out of sync (timezones) between your system, php and mysql.

(This explanation might be wrong with exactly where times are pulled from, but is correct as to the fact that they’re pulled from different places!)

The bit that checks recently online users looks at the last activity entry in user_meta and checks for users logged in within the past 5 minutes. However, last_activity user meta is logged by wordpress using PHP gmdate, and when you search for the last activity in this widget, it uses MYSQL’s NOW() function. If your times are out of sync a user with last activity of <5 minutes will never happen.

Example:

In my local server, the times of last activity are being logged as GMT by WP (PHP). However, I’m in CET and mysql takes it’s timezone from the system (windows), so everyone no matter what was last “seen” by WP and BP at least an hour ago.

See below for more info on setting MySQL timezones

http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html

Skip to toolbar