Page 1 of 1

[SOLVED] Division By Zero Error

PostPosted: Sat Nov 10, 2007 5:31 am
Author: ThePlague
Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Basic Knowledge
Board URL: http://ukk-clan.com

PHP Version: 5
MySQL Version: 5


What was done before the problem appeared?
I added a new admin, checked the staff page and saw this ugly error


What was done to try to solve the problem?
Not much as I dont understand what it means :/



De.scription and Message

I have this error showing on my staff page...

What does it mean and how do I get rid of it?

Warning: Division by zero in /home/xxxxxxxxxx/ukk-clan.com/profilcp/def/def_userfuncs_std.php on line 813

Warning: Division by zero in /home/xxxxxxxxxx/ukk-clan.com/profilcp/def/def_userfuncs_std.php on line 882

Warning: Division by zero in /home/xxxxxxxxx/ukk-clan.com/profilcp/def/def_userfuncs_std.php on line 882

Thanks

Re: Division By Zero Error

PostPosted: Sat Nov 10, 2007 7:42 am
Author: CaNNon
That usually means a cpu issue, but could be caused by bad code so please wait for some others to reply.

I also see some funky math in the site speed.

-- speed with theme
[Page generation time: 2.9876s (PHP: -351% | SQL: 451%)
[Page generation time: 1.0742s (PHP: -92% | SQL: 192%)

-- lowfi speeds
[Page generation time: -0.5245s (PHP: 502% | SQL: -402%)
[Page generation time: 2.5164s (PHP: 137% | SQL: -37%)

I'm sure those are wrong I've never seen a page that was generated 1/2 second before it was requested.

Re: Division By Zero Error

PostPosted: Sat Nov 10, 2007 8:42 am
Author: ThePlague
See what ya mean, just checked my page generation info:

[Page generation time: -0.5797s (PHP: 1441% | SQL: -1341%) | SQL queries: 40 | GZIP disabled | Debug on]

Erm how do I have:

PHP: 1441% | SQL: -1341%


Oh dear :?

It was showing the php & mysql percentages okay earlier as well :/

Re: Division By Zero Error

PostPosted: Sat Nov 10, 2007 10:20 am
Author: CaNNon
The math a cpu does is very different, things like having +0 and -0 defined and that are usable. Shit's Way beyond what they teach us in school. <img>

Re: Division By Zero Error

PostPosted: Sat Nov 10, 2007 5:27 pm
Author: CaNNon
Have you done any edits, or installed any extra mods?

Re: Division By Zero Error

PostPosted: Sun Nov 11, 2007 5:13 am
Author: ThePlague
No, nothing.

It's just a clean install that has been set up and configured to my liking.

I was going to add one or two mods but started getting problems like this one and not to mention crackertracker giving tonnes of false positives lol.

So Im working through eliminating one or two bugs at a time.

If this division by zero is a CPU problem and can be confirmed as such, I'd better inform my hosting company :/

Hopefully you guys here can help me eliminate some suggested possible causes <img>

Re: Division By Zero Error

PostPosted: Sun Nov 11, 2007 6:52 am
Author: CaNNon
I don't think it would hurt to explain and show them the site speed, worst case you'll eliminate a machine error.

Re: Division By Zero Error

PostPosted: Sun Nov 11, 2007 9:51 am
Author: ThePlague
Well I have killed two birds with one stone here:

I have been having some connection issues with my site in that its very slow and has been even before I switched from phpnuke clan to integramod.
I just ran tracert and it was okay yet I couldnt get a ping at all from my domain... wiered, so I submitted that as well as reported the issue I am having with "fuzzy" maths from possibly the CPU.

Hopefully they will take a look for me.

They are normally really good with things like this and are usually pretty quick to respond.

But what I want to know is how can they test the cpu? and if it is a cpu problem then surely others must be getting some strange calculations on thier sites since its shared hosting ?

Any way lets see what these guys say <img>

Re: Division By Zero Error

PostPosted: Mon Nov 12, 2007 9:33 pm
Author: CaNNon
I just checked your site and didn't see any of that funky math.
If you've solved some or all of this please post your info , you may well help some one else.

Thanks!

Re: Division By Zero Error

PostPosted: Tue Nov 13, 2007 7:07 am
Author: ThePlague
Hey CaNNon,

I just got the reply this morning from my hosters:

the first issue you're having is related to an incorrect boot kernel, I
updated that, so it shouldn't show negative generation times.


I too do not see any of the strange arithmatic so I beleive it has worked <img>

I will update this post if anything goes wrong with respect to the fuzzy maths.

So for now, I guess we can call it solved .. thanks for all the help by the way!!!