First of all the mysql is new me so i have no clue how or what to do. I have seen a lot of teaching video about mysql and php. So my problem is that when I log into my phpmyadmin and open a base, called ‘Login’ and a table called ‘users’, there is an error message with the following lines: "Some errors have been detected on the server! Please look at the bottom of the window."
So I checked the bottom of the window and there was a huge red warning box with the following lines: There are any idea how to solve this issue? By the way I am using Linux Mint 19.3 Cinnamon.
Warning in ./libraries/sql.lib.php#613
count(): Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'Login',
string 'users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `users`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'Login',
string 'users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `users`',
NULL,
NULL,
)
2
Answers
From that I remember it is know issue, that could happen if you have old version of phpmyadmin and some newest version of php.
Is it your server and you have root rights? If yes, you can update versions or just provide some small fixes to phpmyadmin code.
If it’s not your server, ask support to update versions or fix that error manually.
First of all get backup sql.lib.php before editing.
Or you can do it manually without command line. Got to
/usr/share/phpmyadmin/libraries
folder directory and search it and copy pastsql.lib.php
and renamesql.lib.php.backup
After do this
Press CTRL + W and find this code
(count($analyzed_sql_results['select_expr'] == 1)
and replace it with((count($analyzed_sql_results['select_expr']) == 1)
aftersudo service apache2 restart
. Here mistake first braket ().