Solved.
Unfortunately, the service I'm using does not use X-forwarded for. I thought all guests were merged into a single session but that wasn't true. All guests had their own session but phpBB counts number of guest IP addresses, as opposed to guest sessions open. So thankfully, not all guests were using the same session and it was only a cosmetic issue.
I went into functions.php and replaced session_ip with session_id under the "Get number of online guests" section. The edited code I'm now using is:
Code: Select all
// Get number of online guests
if ($db->get_sql_layer() === 'sqlite3')
{
$sql = 'SELECT COUNT(session_id) as num_guests
FROM (
SELECT DISTINCT s.session_id
FROM ' . SESSIONS_TABLE . ' s
WHERE s.session_user_id = ' . ANONYMOUS . '
AND s.session_time >= ' . ($time - ((int) ($time % 60))) .
$reading_sql .
')';
}
else
{
$sql = 'SELECT COUNT(DISTINCT s.session_id) as num_guests
FROM ' . SESSIONS_TABLE . ' s
WHERE s.session_user_id = ' . ANONYMOUS . '
AND s.session_time >= ' . ($time - ((int) ($time % 60))) .
$reading_sql;
}
$result = $db->sql_query($sql);
$guests_online = (int) $db->sql_fetchfield('num_guests');
$db->sql_freeresult($result);
return $guests_online;
}
And I went into viewonline.php and made similar changes. Replacing session_ip with session_id .
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the
Support Request Template. It makes it easier for anyone trying to help.