Talisto - 2005-02-10

I recently attempted to set up AWStats for the first time on my Apache v1.3.33 server w/ mod_perl v1.29. Immediately, I started encountering all sorts of weirdness, including strange error messages ("Undefined Subroutine", Error 500's, etc), broken plugin/modules and disappearing icons, among other things.

After a little research, I found reference to a lot of problems with AWStats w/ mod_perl, due to namespace collisions in the various AWStats modules (both the libs and the plugins).

It seems the cause of this problem is that AWStats' various lib/plugin modules don't follow the Perl5 standards for package declaration, which causes an array of problems with mod_perl; browse the following links for reference:
http://groups.yahoo.com/group/modperl/message/58979
http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs

Now, since AWStats has been this way for years (and the problem was discussed openly at least a year ago), I figured this was not likely to be fixed anytime soon, so I decided to fix it myself. Using AWStats 6.4 as my base, I've assigned proper package declaration names to all the libs and plugins that I'm currently using, and have modified all the appropriate references in the main awstats.pl script accordingly. Well, lo and behold, all my problems with AWStats and mod_perl seem to have disappeared! Hooray!

I s'pose I should probably talk to the AWStats developers and see about getting my changes put into CVS, but I'd like to get a few other people to test it first. If any of you are having problems with AWStats w/ mod_perl and would like to give my changes a go, please email me at: talisto (at) gmail (dot) com.

Thanks,
Talisto