Gossamer Forum
Home : Products : Links 2.0 : Discussions :

fatal error: Illegal division by zero ?

Quote Reply
fatal error: Illegal division by zero ?
Hi All,

When I tried to build my pages tonight I got this error:

Updating record: 175, marking as new.
Updating record: 176, marking as new.
Updating record: 177, marking as new.
Updating record: 1, marking as new.
Updating record: 181, marking as new.
Updating record: 2, marking as new.
Updating record: 182, marking as new.
Done.

Updating ratings ..
Updating rating to 10.00 for link id 69
Updating rating to 10.00 for link id 111

CGI ERROR
==========================================
Error Message : fatal error: Illegal division by zero at /client/home/jmonson/cgi-bin/links/admin/nph-build.cgi line 432, chunk 121.

Script Location : /client/home/jmonson/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00401
Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /client/home/jmonson/docs
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.gamesta.com
HTTP_REFERER : http://www.gamesta.com/cgi-bin/links/admin/admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
PATH : /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/bin/mh:/root/bin
QUERY_STRING :
REMOTE_ADDR : 209.105.4.55
REMOTE_HOST : cb55.ips.paulbunyan.net
REMOTE_PORT : 1851
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/links/admin/nph-build.cgi
SCRIPT_FILENAME : /client/home/jmonson/cgi-bin/links/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/links/admin/nph-build.cgi
SERVER_ADMIN : jmonson@paulbunyan.net
SERVER_NAME : www.gamesta.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.2.6 FrontPage/3.0.4

I was able to build it fine this morning. Can anyone help me?


------------------
Josh Monson
Webmaster
http://www.gamesta.com
The Online Gaming Directory
Quote Reply
Re: fatal error: Illegal division by zero ? In reply to
Strange.. Check your ratings directory and see if someone was able to rate a link 0? They shouldn't be able to, but that might be the problem. Look at the contents of the files in the admin/data/rates folder.

Let me know what you find,

Cheers,

Alex
Quote Reply
Re: fatal error: Illegal division by zero ? In reply to
Thanks Alex,

When I looked in the admin/data/rates I saw a file called 130 that was 0 in size compared to 26-29 in the other files. I simply deleted it and then I was able to build my pages just fine. I still don't know how it was created in the first place however.



------------------
Josh Monson
Webmaster
http://www.gamesta.com
The Online Gaming Directory