AWStats
AWStats copied to clipboard
Illegal division by zero at /usr/share/awstats/wwwroot/cgi-bin/awstats.pl line 14250.
Greetings, I'm having truncated output with error message: Illegal division by zero at /usr/share/awstats/wwwroot/cgi-bin/awstats.pl line 14250.
Steps to reproduce:
download tar.gz to /tmp/ and extract
cp /tmp/awstats/awstats.ljkpbTxWy1DjUzu63TUA3D.conf /etc/awstats
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -month=10 -year=2015 -output=main -config=ljkpbTxWy1DjUzu63TUA3D
(your path to awstats could vary)
Tested in 7.1, 7.4, 7.5 with same result.
Any help appreciated .-)
http://cipisek.stable.cz/awstats.tar.gz
The line nb 14250 in error message refers to which version ?
@eldy the Illegal division by zero error happens in this line:
https://github.com/eldy/awstats/blob/331284f02befbff64b28e3dd972b4ce3e97a706b/wwwroot/cgi-bin/awstats.pl#L14317
The division by zero happens when you have only 206 hits for your downloads.
The bug is still there in the latest develop branch on GitHub.