i get the following error on the dbtuner tab with both release and dev version

warning: Division by zero in /home/xxxxx/public_html/sites/all/modules/dbtuner/dbtuner.mysqltuner.inc(84) : eval()'d code on line 1

Comments

virtuali1151’s picture

I am getting this error as well... Any fix avail..??

sdsheridan’s picture

This seems to be coming from expressions using the MySQL Status value of uptime_since_flush_status. However, apparently uptime_since_flush_status is only available on 5.0 COMMUNITY servers from 5.0.35 - not on ENTERPRISE servers and not in any other major branch than 5.0 and also not in 5.0.x before 5.0.35, and then again from what I can tell from the MySQL bug issue where this arose (http://bugs.mysql.com/bug.php?id=24822), not necessarily consistently in all versions (see 6 May 2009 22:23 Bugs System entry where is says it was pushed into 5.0.82).

The way I got around this was to insert the following after the 'else' on line 76 of dbtuner.mysqltuner.inc:

        if ( $value == 'Uptime_since_flush_status' ) {  // If Uptime_since_flush_status doesn't exist
          $value = $mylist['Uptime'];                   // use Uptime instead
        }

My division by zero warnings have gone away, and I have more information than I did before on a bunch of things. Not sure if this is the 'right' thing to do, but it seems reasonable.

Shawn

virtuali1151’s picture

tried this.. but still get this error:

Type: php
Division by zero in /home/site/public_html/sites/all/modules/dbtuner/dbtuner.mysqltuner.inc(87) : eval()'d code on line 1.
Backtrace:
eval(NULL)[dbtuner.mysqltuner.inc:87];
.dbtuner_mysqltuner_process_data(array)[dbtuner.mysqltuner.inc:14];
..dbtuner_mysqltuner_page(a:0:{})[?:?];
...call_user_func_array(a:2:{i:0;s:23:"dbtuner_mysqltuner_page";i:1;a:0:{}})[menu.inc:348];
....menu_execute_active_handler(a:0:{})[index.php:18];
.....index.php

sdsheridan’s picture

You'll want to look for a variable that is used in the configuration file and in particular in a division that does not exist on your MySQL installation.

gateway69’s picture

Im not getting the lines you are.. but In my admin area for db tuner mysqltuner option im seeing this error

Warning: Division by zero in eval() (line 1 of /var/www/sites/all/modules/dbtuner/dbtuner.mysqltuner.inc(83) : eval()'d code).
robit8deb’s picture

I get these too. using drupal 6 php 5.3

mattwmc’s picture

Getting it too after upgrading to php 5.3 (D6).