Tags:
create new tag
view all tags

Bug: The statistics script is badly broken in the latest beta.

Enter description here

When I run the statistics script I get garbage:

Month: Topic
views:
Topic
saves:
File
uploads:
Most popular
topic views:
Top contributors for
topic save and uploads:
/(?:net|shared|home|ws)/

The goop at the end is a configuration variable value from one of my plugins.

The problem seems to be here:

464                 } elsif( $tmp =~ /<\!\-\-statDate\-\->/ ) {
465:                    $statLine = $_;
466:                    $idxTmpl = $x;
467                 }

$statLine is set to whatever junk is in $_

If I change the above to this:

464                 } elsif( $tmp =~ /<\!\-\-statDate\-\->/ ) {
465:                    $statLine = $tmp;
466:                    $idxTmpl = $x;
467                 }

The correct output is produced.

Test case

See above

Environment

TWiki version: Latest beta
TWiki plugins:  
Server OS: Solaris
Web server: Apache
Perl version: 5.6.1
Client OS: Solaris
Web Browser: Mozilla

-- AlanBurlison - 31 Jan 2003

Follow up

Fix record

Yep, that is a bug, possibly showing up only under mod_perl? Is fixed, in TWikiAlphaRelease and TWiki.org. Also fixed a related issue where the statistics page could not be read if the web has a read access restriction.

-- PeterThoeny - 01 Feb 2003

Nice catch - yes I am running under mod_perl smile What is the process for getting hold of alpha releases?

-- AlanBurlison - 01 Feb 2003

Just click on TWikiAlphaRelease and follow the links - alphas are updated near midnight, Pacific Time.

Re ModPerl - it's best not to run long-running scripts such as statistics under mod_perl. See SelectiveModPerl for details, but the summary is that mod_perl is intended for short-running programs where it's worth keeping the compiled Perl code in memory. statistics doesn't qualify since it is run every 24 hours, i.e. you'll reduce memory use at no performance loss if you don't use mod_perl for this script.

Also, it's important to say you are running under mod_perl when raising bugs - testenv has a handy version string that can provide these details in the environment variables section.

-- RichardDonkin - 01 Feb 2003

Well, my test machine has 1/2Gb of memory, and the production machine has 24Gb, so I'm not that worried about a bit of memory bloat cool! I've also looked at the SelectiveModPerl topic, and it doesn't actually give a definitive list - several of the scripts aren't mentioned. I've made a comment to that effect in the SelectiveModPerl topic.

I'll also bear in mind the 'mention mod_perl' point in future, although this particular bit of code was broken irrespective of the presence of mod_perl.

-- AlanBurlison - 01 Feb 2003

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2003-02-01 - AlanBurlison
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.