• Resolved punitsoftac

    (@punitsoftac)


    Hi,

    I am Punit from Softaculous Team. We have observed an error in WordPress installer.

    We get following error when we visit installation page :
    “One or more database tables are unavailable. The database may need to be repaired.”

    We are getting this error in WordPress 5.5.2, 5.4.3, 5.3.5, 5.2.8, 5.1.7

    It seems that error has occurred due to change of following code of wp-includes\functions.php

    $described_table = $wpdb->get_results( “DESCRIBE $table;” );
    if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
    continue;
    }

Viewing 15 replies - 16 through 30 (of 32 total)
  • rubihk

    (@rubihk)

    I’m having the same problem, I wanted to start using WP, but since I don’t have any previous knowledge I want to try it first locally using MAMP. Before the WP installation start, I get this message ‘One or more database tables are unavailable. The database may need to be repaired.’

    MySQL ver: 5.7.30
    PHP ver: 7.4.9

    punitsoftac I tried to do as you suggested but then I got this message back.
    ‘This page isn’t working localhost is currently unable to handle this request.
    HTTP ERROR 500’

    I Have same issue, Totaly new hosting by verry good Provider and excelent servers
    error message

    “One or more database tables are unavailable. The database may need to be repaired.”

    have delete whole files take version 5.4.1 and no problems

    netpointsystems

    (@netpointsystems)

    they broke something in the newest installer, same problem in my case, THERE IS NO DIFFERENCE i have already a database created or not, I have tried even when I didnt created database on my hosting yet this error appears at once when I try to start installation.

    The newest relase of the installer is BROKEN, there is nothing to do with our hostings environments or database because this is the first step of the installer where the error appears, we didnt even thouched database cretendials yet

    dawidadach

    (@dawidadach)

    @macmanx as @kubuntux said – it doesn’t matter.

    It seems that new version 5.5.2 has some bug, I just uploaded files to FTP and opened my page. Instead of wizard (where I usually put my database credentials) I got an error:

    “One or more database tables are unavailable. The database may need to be repaired.”

    It’s fresh installtion, no database, no wp-config wile – nothing.

    @kubuntux I did installed 5.5.1 but it automatically updated to 5.5.2 and there are other issues with DB after update ??

    netpointsystems

    (@netpointsystems)

    anyone can share the earlier/working installer please ?

    kubuntux

    (@kubuntux)

    @dawidadach Mine have auto updated as well, but I have no problems.

    loginizer

    (@loginizer)

    @macmanx

    I am also from Softaculous team. I will try to provide some more details.

    The issue is in the function is_blog_installed in wp-includes/functions.php in a loop for $wpdb->tables() it checks if the table already exists using the DESCRIBE query :
    $wpdb->get_results( “DESCRIBE $table;” );

    Previously it used to just check if the function returned false it would assume table is not present.
    if ( ! $wpdb->get_results( “DESCRIBE $table;” ) ) {
    continue;
    }

    With the change in WordPress 5.5.2 it checks if the returned value is an array and that the returned array has the count 0 :
    $described_table = $wpdb->get_results( “DESCRIBE $table;” );
    if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
    continue;
    }

    The function get_results returns NULL when the database does not exist which is the case when we perform a fresh installation (via WEB) since the function checks if it is an array and the output is NULL this function assumes all tables are present hence triggerring the error that the tables already exist try to Repair and does not allow to install WordPress.

    Maybe you are not able to replicate the error because either the wp-config.php is there and the database also exists but the tables are not present in which case you will receive the response from get_results() as array with 0 keys. Try deleting the wp-config.php file and check if you are able to replicate the issue.

    Looking forward to the fix.

    I can confirm that we too are experiencing the same issue on a server whare we have lot of other WP installed.
    Looks like is a regeression introduced in the latest 5.5.2
    I opened a ticket on the Trac, pointing to the quick fix provided above by @punitsoftac that for us seem to fix the issue
    Stefano

    rubihk

    (@rubihk)

    @loginizer, the only file I have in the wordpress folder is (wp-config-sample.php) I did delete it from the folder but still wasn’t able to install.
    I’m using MAMP to work locally since it is the first time I use WP, I spent the whole day trying to just install WP…

    netpointsystems

    (@netpointsystems)

    it is not related to your wp-config file or anything else, the installer is BROKEN

    pittgi

    (@pittgi)

    My issue:

    Downloaded newest XAMPP and WP and installation doesn’t even startet. Error message, when running setup-config.php: “One or more database tables are unavailable. The database may need to be repaired.”

    My solution:

    Install an older Version of WP (v.5.5 worked for me). Installation should work. After installating update to newest version within WP.

    Worcester Web Studio

    (@raymondgillespie)

    Just to chip in, we’re getting the same issue on cPanel with PHP 7.3/7.4 – it doesn’t even attempt to connect to the DB, so seems like a PHP issue.

    The problem looks like a bug introduced in the latest release and that it’s currently investigated.
    you can see it on the Trac:
    https://core.trac.www.ads-software.com/ticket/51676

    netpointsystems

    (@netpointsystems)

    install older version for now is the only solution I belive

    farooq12

    (@farooq12)

    I Had the same issue I tried WordPress 5.5.1 and it’s working fine now.
    It is not about server issues it’s about WordPress

Viewing 15 replies - 16 through 30 (of 32 total)
  • The topic ‘WordPress Installer Error’ is closed to new replies.