Bug: awstats in cpanel-awstats-8.0-3.cp108~el9 no longer works with plugins
We are currently using cPanel awstats with one of the geoip plugins , but it looks like 8.0-3.cp108~el9 that was released with cPanel 126.0.38 broke that by changing the way the HISTORY variable is defined even though this doesn't appear to be listed in the cPanel changelog. I was able to fix this by changing the following line:
my ( $HISTORY, $HISTORYTMP );
to
our ( $HISTORY, $HISTORYTMP );
I also can't find this change in the upstream code at http://awstats.sourceforge.net
-
Hey there! Can you let me know specifically what plugin you're using?
0 -
We are using geoip2_city.pm (via some manual patches as per this guide: https://organicwebs.com.au/category-list/388-getting-awstats-running-with-maxmind-geoip2-geolite2-city-mmdb-on-whm-cpanel-server). With the recent changes to the awstats.pl code, the SectionReadHistory_geoip2_city function can no longer access the HISTORY variable.
Also, I forgot to mention the bug is most easily visible when viewing previous awstats months, it shows: Error: History file is corrupted (End of section PLUGIN not found). Restore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).
0 -
Thanks for the additional details. As far as I can tell cPanel has never officially supported plugins for AWStats, as we don't with most tools included in the product, so I don't believe there's much I can offer as far as fixing this.
It's also worth noting that the most recent build is cpanel-awstats-8.0-4.cp130 on a version 132 system, so that may even have additional changes beyond what you're seeing in that older version on your machine.
0
Please sign in to leave a comment.
Comments
3 comments