21
ron-cpw
Re: Who's Online question
  • 2007/3/18 14:36

  • ron-cpw

  • Just popping in

  • Posts: 82

  • Since: 2006/12/19


Oh...and another thing I just had to eliminate was the Errors that appeared in the Debug mode when you invoked the More... popup.

There was always 4 Errors:

Quote:
Notice: Only variables should be assigned by reference in file /misc.php line 177
Notice: Only variables should be assigned by reference in file /misc.php line 182
Notice: Only variables should be assigned by reference in file /kernel/module.php line 542
Notice: Only variables should be assigned by reference in file /misc.php line 185


Well...these are not really Errors it seems...but 'advisories' that there is a sloppy character in those lines that give this version of PHP some gas.

Each line has a rogue ampersand...when you delete that character, the Error is no longer logged.

e.g.
file /misc.php line 177
$online_total =& $online_handler->getCount();


Zap the ampersand after the EQUALS sign, and the error departs.
$online_total $online_handler->getCount();


Doesn't help my problem, but eliminates the clutter of bogus errors... I would guess one could clean up all the files that yield that error throughout the site to slim down the Debug listings.

22
ron-cpw
Re: Who's Online question
  • 2007/3/18 16:23

  • ron-cpw

  • Just popping in

  • Posts: 82

  • Since: 2006/12/19


HA! ....fixed it.

Details to follow.

23
ron-cpw
Re: Who's Online question
  • 2007/3/18 16:37

  • ron-cpw

  • Just popping in

  • Posts: 82

  • Since: 2006/12/19


Once I set up the 'shadow' debug install of XOOPS on the same server....I now had a working version to compare to my non-working site on the same server.

That eliminated any server-related issues.

I then compared all the entries in both databases that related to online and module data...and they both looked good...so that eliminated any flakey database issues.

So..the problem had to be in one of the scripts dealing with Who's Online.

I did a 'word search' for online_module in the 2.0.16 install package to find those files that deal with this term.

It was located in:

/kernel/online.php
/misc.php
/mainfile.php

I downloaded each of those files from both the working and non-working sites.
Using a file-compare program, I compared each file from the bad site to it's sister on the good site.

Ignoring the specifics that relate to the install path, db name, etc., the ONLY difference came up in line 41 of mainfile.php

The bad site had:

define('XOOPS_CHECK_PATH', 1);

The good site had:

define('XOOPS_CHECK_PATH', 0);

Changed the 1 to 0, uploaded the changed file to the bad site....

...and, bingo...we now see the module column in the More... popup, as well as the useage info in the Who' Online block.

One of life's mysteries...how did it get changed in the first place? (rhetorical question.. )

Anyone with insight care to explain that line and what it does?
It is commented as:
"Protect against external scripts execution if safe mode is not enabled"

Anyhow, we can put this bast*rd in the books.... done.

Quite an educational experience.

24
ron-cpw
Re: Who's Online question
  • 2007/3/19 3:00

  • ron-cpw

  • Just popping in

  • Posts: 82

  • Since: 2006/12/19


A good postscript as well:

Also figured out (sheepishly) that unless the Who's Online block is visible on a module's page...it won't update the Online Module value.

...that slowed up the debugging a bit.

25
BlueStocking
Re: Who's Online question

Good Show,
Thanks for the posts
https://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

Login

Who's Online

167 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 167


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits