Topic: Error: Unable to fetch table status.

Hi all wink

I found a little problem when punBB was installed on www.free.fr hmm

Error: Unable to fetch table status.

I must comment this part of code in admin_index.php and then no error !?

// Collect some additional info about MySQL
if ($db_type == 'mysql' || $db_type == 'mysqli')
{
    $db_version = 'MySQL '.$db_version;

    // Calculate total db size/row count
    $result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());

    $total_records = $total_size = 0;
    while ($status = $db->fetch_assoc($result))
    {
        $total_records += $status['Rows'];
        $total_size += $status['Data_length'] + $status['Index_length'];
    }

    $total_size = $total_size / 1024;

    if ($total_size > 1024)
        $total_size = round($total_size / 1024, 2).' MB';
    else
        $total_size = round($total_size, 2).' KB';
}

roll

Sorry I speak English like a Spanish cow :/
Multy Forums Free (Multi PunBB Project) (on stand by)
http://multy.forums.free.fr/forum_demo/

Re: Error: Unable to fetch table status.

Moved to Troubleshooting
That code itself is fine, if you want to track down the actual source of your issue you can uncomment the code, enable debug mode, and paste the full error

Re: Error: Unable to fetch table status.

I just installed punbb on my free.fr account and noticed that the config.php code was wrong: the line where $db_name is defined was incorrect.

=> Check the line <<< $db_name = "..."; >>> and fix it if necessary.

Re: Error: Unable to fetch table status.

$db_name uses the name you entered in install.php wink