Previous Thread
Next Thread
Print Thread
Rate Thread
#118034 04/22/2001 12:54 AM
Joined: Sep 2000
Posts: 85
Member
Member
Offline
Joined: Sep 2000
Posts: 85
NOTE: I did a search before posting this. laugh

I'm getting an error saying there is an "illegal division by zero in line 571" from my edit_post.cgi file after installing the Anchor hack. In other words, line 571 is code from the hack that replaces the original script. I've since replaced the hack code with the original, effectively disabling the anchor hack after editing posts. Could someone look at the code and tell me what might be wrong with it? Here is the code from the hack...
Code
code:
Thanks in advance!

Ethan


I'm your worst nightmare. A pumpkin with a gun!
Sponsored Links
#118035 04/22/2001 1:08 AM
Joined: Apr 2001
Posts: 10
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 10
well i seriously don't know about this but try this

the error is in line

$doextra = int(($in{reply_num} + 1)/$vars_display{HTMLDisplayMax}) + 1;

because that's the only line i saw with a division in it

try changing it to
$doextra = int(($in{reply_num} + 1)-$vars_display{HTMLDisplayMax}) + 1

because that looks like the right algorithm but i dunno....i don't even know CGI!


4
#118036 04/22/2001 1:11 AM
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
I'll look into it.

#118037 04/22/2001 1:27 AM
Joined: Sep 2000
Posts: 85
Member
Member
Offline
Joined: Sep 2000
Posts: 85
eek Wow! Thanks Mastermind! I didn't expect a response so fast! YAY!! *happy dance* laugh Don't mind me. I've been up just a little too long. Heh heh.

Ethan


I'm your worst nightmare. A pumpkin with a gun!
#118038 04/22/2001 1:48 PM
Joined: Sep 2000
Posts: 85
Member
Member
Offline
Joined: Sep 2000
Posts: 85
I just checked and I'm getting the same error in ubb_new_reply.cgi at line 842 (482?). Here's the code that's there...
Code
code:
It's probably something obvious that I'm just not seeing. (Like the time I couldn't get a 2 line hack to work and it was just because I forgot a "{".

Ethan

[ April 22, 2001 01:52 PM: Message edited by: Ethan Gilchrist ]


I'm your worst nightmare. A pumpkin with a gun!
Sponsored Links
#118039 04/23/2001 9:30 PM
Joined: Sep 2000
Posts: 85
Member
Member
Offline
Joined: Sep 2000
Posts: 85
Hey Mastermind! Have you had a chance yet to check out my problem? I might try again to see if I can get it to work. The funny thing is it was working fine before I upgraded to 6.04 After reinstalling the hack on that version I started getting the errors. And it was the latest version of the hack as well. I used the previous one on 6.03. Oh and the only modifications I had when I tried to install the anchor hack was the email to replies hack (which affects different code) and my modifications to the CP (to let mods modify their style templates).

Ethan


I'm your worst nightmare. A pumpkin with a gun!

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3840
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 22
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)