PHPMyAdmin – count(): Parameter must be an array or an object that implements Countable

Easiest Method:

Just run this below command line in terminal and come back to PhpMyAdmin. Now it works fine 🙂

sudo sed -i "s/|s*((count($analyzed_sql_results['select_expr'])/| (1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php

Manual Method:

Open sql.lib.php file

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

Find for count($analyzed_sql_results['select_expr'] code on file. You can get this at line ~613. You can see this below wrong code

|| (count($analyzed_sql_results['select_expr'] == 1)

Just replace that wrong code with this below one

|| ((count($analyzed_sql_results['select_expr']) == 1)

Save the file and come to PhpMyAdmin.

Now it works fine 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *