View Full Version : Who's Online Prob [Read In]
Bison
09-20-2002, 03:03 AM
It seems that everytime I get about 20+ visitors online at one time, I get the following error when I go to view Who's Online:
Fatal error: Call to a member function on a non-object in /home/www/fsforum/forum/online.php on line 148
This line points to the default case ... where the admin location settings are.
Please advise ....
Regards,
Rolodex
Xenon
09-20-2002, 12:16 PM
if it's a hacked online.php try to upload an original one.
also next time you should post 5 lines before and 5 lines after the error line, that'll help users trying to help you
Bison
09-20-2002, 03:26 PM
Well I know that I can put a un-hacked copy in but this started happening after
I applied the who's online w/locations hack (g-force2k2) ... It appears that the
hack doesn't do much but add another section into the code. there's no
additional queries involved ... strange that it only occurs when the site
visitor count gets to 20+ ....
--
Best regards,
Rolodex mailto:rolodex@megamyths-co-uk.org
NTLDR
09-20-2002, 05:04 PM
If you have a $DB_site->query just before or on that line then you need to have sure you have:
global $DB_site;
On the line above it. If not check that you applied the hack correctly.
Bison
09-20-2002, 05:14 PM
Like this:
case 'getinfo':
global $DB_site;
$userid = explode('userid=', $userinfo[location]);
$user = $DB_site->query_first("SELECT userid, username FROM user WHERE userid = ".intval($userid[1]));
if ($user[username]) {
$userinfo[where] = "Viewing Profile of <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";
} else {
$userinfo[where] = "Viewing Profile of a Forum Member";
}
NTLDR
09-20-2002, 05:22 PM
Yes, try it now with that extra line.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.