phpBB-TweakS
 
Advanced Search
   
 
Home Downloads FAQ Register FAQ Memberlist Usergroups Ranks
 
 

Please help us to develop!

 
It appears you are using a browser that is not based on Internet Explorer, this means you are not viewing the web as good as you should be. Other browsers might try to immitate Internet Explorer, but none can parse the web as it should like Internet Explorer can. So view the web as it was meant to be with Avant Browser!
         

phpBB-TweakS Forum Index Footer Hack Warning: Division by zero
Display posts from previous:   
Half Thread Topic  Fully Thread Topic  Download Topic
      All times are GMT - 5 Hours  
Post new topic  Reply to topic

Sun Feb 12, 2006 5:54 pm
Author Message
jsr
Support Team
Support Team


Joined: 06 Jan 2005
Posts: 407
Words Posted: 50,471
Average Post: 124.01


Post subject: Warning: Division by zero Reply with quote

When i go on delete a post i get this message:
Code:
Warning: Division by zero in /home/*****/public_html/includes/page_tail.php on line 61
which is this:
Code:
$sql_percent         = round($sql_percent / $gentime * 100);
if i remove that bit of code i dont get that message anymore.
Post #1
      Back To Top  

Sun Feb 12, 2006 6:39 pm
Author Message
aUsTiN
Webmaster
Webmaster


Usa Georgia

Joined: 05 Jan 2005
Posts: 3684
Words Posted: 144,671
Average Post: 39.27

Location: USA

Post subject: Reply with quote

This one could be tricky, so here is a start.

Make sure you edited mysql4.php or mysql.php correctly. If thats fine, check the last few mods you have added & make sure they are not using

$starttime
$endtime
$gentime

in them, if they are, they are overriding the current ones.... My guess is its possibly something in posting.php if thats the file returning the error...
Post #2
      Back To Top  

Sun Feb 12, 2006 7:16 pm
Author Message
jsr
Support Team
Support Team


Joined: 06 Jan 2005
Posts: 407
Words Posted: 50,471
Average Post: 124.01


Post subject: Reply with quote

I've looked at every thing, i'll just have to leave that bit of code out.
Post #3
      Back To Top  

Sun Feb 12, 2006 7:30 pm
Author Message
aUsTiN
Webmaster
Webmaster


Usa Georgia

Joined: 05 Jan 2005
Posts: 3684
Words Posted: 144,671
Average Post: 39.27

Location: USA

Post subject: Reply with quote

Have you determined which is zero? $gentime or $sql_percent
Post #4
      Back To Top  

Sun Feb 12, 2006 7:34 pm
Author Message
jsr
Support Team
Support Team


Joined: 06 Jan 2005
Posts: 407
Words Posted: 50,471
Average Post: 124.01


Post subject: Reply with quote

$gentime
Post #5
      Back To Top  

Sun Feb 12, 2006 9:10 pm
Author Message
aUsTiN
Webmaster
Webmaster


Usa Georgia

Joined: 05 Jan 2005
Posts: 3684
Words Posted: 144,671
Average Post: 39.27

Location: USA

Post subject: Reply with quote

Ok, so $gentime is determined by $starttime - $endtime

Code:

$gentime             = round(($endtime - $starttime), 1);


There. So find out whats going wrong in that one. What are the values of $starttime & $endtime, then you'll know which one is being over-ridden.
Post #6
      Back To Top  

Sun Feb 12, 2006 9:16 pm
Author Message
jsr
Support Team
Support Team


Joined: 06 Jan 2005
Posts: 407
Words Posted: 50,471
Average Post: 124.01


Post subject: Reply with quote

By changing:
Code:
$sql_percent         = round($sql_percent / $gentime * 100);
to:
Code:
$gentime             = round(($endtime - $starttime), 1);
has fixed it, thanks.
Post #7
      Back To Top  

Mon Feb 13, 2006 2:25 am
Author Message
aUsTiN
Webmaster
Webmaster


Usa Georgia

Joined: 05 Jan 2005
Posts: 3684
Words Posted: 144,671
Average Post: 39.27

Location: USA

Post subject: Reply with quote

Those are 2 different things.

:: [ SQL Load: 56% Time: 0.1 ] :: = SQL Percent
:: [ Load Time: 0.2 Seconds ] :: = Gentime
Post #8
      Back To Top  

 
         

Post new topic  Reply to topic

phpBB-TweakS Forum Index Footer Hack Warning: Division by zero
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


      Back To Top  

Page 1 of 1
Jump to:  
 
Protected by phpBB Security © phpBB-TweakS
phpBB Security Has Blocked 3,237 Exploit Attempts.

· Archive · Sitemap: Index · Sitemap: Forums · Sitemap: Topics · Sitemap: Posts ·

:: [ Load Time: 2.8 Seconds ] :: [ 30 Queries ] :: [ 3,578 Page(s) Viewed Today ] ::
:: [ Todays Queries: 107,206 ] :: [ Highest Load: 1,396,429 Queries On May. 08, 2007 ] ::
:: [ SQL Load: 60% Time: 1.7 ] :: [ PHP Load: 40% Time: 1.1 ] :: [ Debug: On ] :: [ GZIP: Enabled ] ::
:: The server last rebooted 82 days, 2 hours, 20 minutes, 58 seconds ago. ::

The phpBB[Network]!
       
Powered by phpBB 2.0.* © 2001, 2002 phpBB Group
Avalanche style by What Is Real © 2004