AWStats icon indicating copy to clipboard operation
AWStats copied to clipboard

Illegal division by zero at /usr/share/awstats/wwwroot/cgi-bin/awstats.pl line 14250.

Open henkye opened this issue 10 years ago • 2 comments

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

henkye avatar Nov 20 '15 13:11 henkye

The line nb 14250 in error message refers to which version ?

eldy avatar Sep 11 '16 09:09 eldy

@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.

avian2 avatar Mar 20 '17 09:03 avian2