This sounds like somehow the code which connects to the DB is unable to resolve correctly for your host.
We use the following code to connect to your DB:
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
The “DB_HOST” usually has a value of “localhost” and I suspect that this parameter is causing the problem.
If as you say this was working a few days ago, I would firstly contact your host provider and ask them if they have changed the hostname to anything other than “localhost” or if they’ve done anything else which may affect the DB login functionality I described above.
Thread Starter
PhdRA
(@phdra)
Again, I checked how the plug-in on a new installation of wordpress! and on another server! still not working, the host is localhost.
If you try to change the prefix displays the message:
Fatal error: Call to undefined method mysqli_result :: fetch_all () in / wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php on line 534
Successful tryin that moved did on an earlier version of the plug – or it could be the cause?
Fatal error: Call to undefined method mysqli_result :: fetch_all ()
You are getting this error because your server does not have the mysqlnd driver which is required for the “fetch_all” method.
See this for more info: http://www.php.net/manual/en/mysqli-result.fetch-all.php
I want to try an alternative method which will hopefully cater for host setups like yours which are on servers without some of the mysql drivers.
But – I would need you to test and verify it. Can you please get in contact with us using the below contact form so we can send you an updated zip file so you can try it out for us?
http://support.tipsandtricks-hq.com/contact
Hi,
I’ve had the same message, the cause was due to the “complex name” of my DB:
i’ve created the DB “wp_4.1”.
Then What’s the hell going on ?????
The DOT between 4 and 1! Why?
open the file wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php and go to line 542:
the SQL request is : $list_tables_sql = “SHOW TABLES FROM {$database};”
then the SQL expression don’t take the entire name “wp_4.1” because the variable {$database} is not “protected” …..
To resolve that little bug, add a “`” character (ALT Gr + 7) around {$database} variable!
then you have the new line: $list_tables_sql = “SHOW TABLES FROM {$database}
;”
It works for me 😉
Hi,
I’ve had the same message, the cause was due to the “complex name” of my DB:
i’ve created the DB “wp_4.1”.
Then What’s the hell going on ?????
The DOT between 4 and 1! Why?
open the file wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-database-menu.php and go to line 542:
the SQL request is : $list_tables_sql = “SHOW TABLES FROM {$database};”
then the SQL expression don’t take the entire name “wp_4.1” because the variable {$database} is not “protected” …..
To resolve that little bug, add a “`” character (ALT Gr + 7) around {$database} variable!
then you have the new line: $list_tables_sql = “SHOW TABLES FROM ‘{$database}’;”
It works for me 😉
Hi pc-net-assistance.fr, thank you for reporting your solution. One of the plugin developers will check your code further.
Regards
hi pc-net-assistance.fr,
thanks. we will add the backticks to the next release.