Warning in ./libraries/plugin_interface.lib.php#551 count(): Parameter must be an array or an object that implements Countable

12,575

Solution 1

This fixed my issue:

Import/Export issues If you are also getting an error Warning in ./libraries/plugin_interface.lib.php#551 under import and export tabs:

Backup plugin_interface.lib.php

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

Edit plugin_interface.lib.php

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

Press CTRL + W and search for if (! is_null($options) && count($options) > 0) {

If not found, try search for if ($options != null && count($options) > 0)

Replace with if (! is_null($options) && count((array)$options) > 0) {

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

Solution 2

Just run this command line in terminal and come back to PhpMyAdmin.

sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php
Share:
12,575
Admin
Author by

Admin

Updated on June 07, 2022

Comments

  • Admin
    Admin almost 2 years
    Warning in ./libraries/plugin_interface.lib.php#551
     count(): Parameter must be an array or an object that implements Countable
    
    Backtrace
    
    ./libraries/display_import.lib.php#371: PMA_pluginGetOptions(
    string 'Import',
    array,
    )
    ./libraries/display_import.lib.php#456: PMA_getHtmlForImportOptionsFormat(array)
    ./libraries/display_import.lib.php#691: PMA_getHtmlForImport(
    string '5de53ad1bdb35',
    string 'database',
    string 'laxie_magento',
    string '',
    integer 209715200,
    array,
    NULL,
    NULL,
    string '',
    )
    ./db_import.php#43: PMA_getImportDisplay(
    string 'database',
    string 'laxie_magento',
    string '',
    integer 209715200,
    )
    ./index.php#53: include(./db_import.php)
    

    Getting this error on Import tab of phpMyAdmin and below are the server details

    Server: Localhost via UNIX socket
    Server type: MySQL
    Server version: 5.7.28-0ubuntu0.18.04.4 - (Ubuntu)
    Protocol version: 10
    Server charset: UTF-8 Unicode (utf8)