Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 845
Piyush Nath Avatar asked Dec 02 '19 16:12

Piyush Nath


Video Answer


1 Answers

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)

like image 187
Piyush Nath Avatar answered Sep 18 '22 19:09

Piyush Nath