skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. First of all get backup sql.lib.php before editing.

    sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.backup
    

    Or you can do it manually without command line. Got to /usr/share/phpmyadmin/libraries folder directory and search it and copy past sql.lib.php and rename sql.lib.php.backup

    After do this

    sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php
    

    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) after sudo service apache2 restart. Here mistake first braket ().

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search