Warning in ./libraries/sql.lib.php#613 count()

Problem with phpMyAdmin and PHP 7.2: “Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”

Compatibility issue in sql.lib.php with PHP 7.2 and phpMyAdmin

For temporary fix, update sql.lib.php

First, backup sql.lib.php:

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

Edit sql.lib.php in nano:

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

Press CTRL + W and search for

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

Replace with

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

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

For permanent fix, update phpMyAdmin to the latest version.

This post was created with our nice and easy submission form. Create your post!

What do you think?


Leave a Reply

Your email address will not be published.

GIPHY App Key not set. Please check settings



Cybersecurity: Safety and Cost Equilibrium

Eco-Friendly Affiliate Programs You Might Want to Check Out