Report this

What is the reason for this report?

Error On phpMyAdmin

Posted on November 1, 2018

I keep getting this error before I import a database:

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 '5bdb3279a72ae',
string 'database',
string 'chihenne',
string '',
integer 16777216,
array,
NULL,
NULL,
string '',
)
./db_import.php#43: PMA_getImportDisplay(
string 'database',
string 'chihenne',
string '',
integer 16777216,
)

The import works fine after I select “Ignore”, but what can I do to remove this error?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I guess you are using Ubuntu 18.04 with PHP 7.2. The error happens because there is compatibility issue. The best way to fix the problem is to manually upgrade phpMyAdmin no new version.

You can also fix this by editing the library itself.

  1. Make a backup first sudo cp /usr/share/phpmyadmin/libraries/plugin_interface.lib.php /usr/share/phpmyadmin/libraries/plugin_interface.lib.php.bak

  2. Edit the library sudo nano /usr/share/phpmyadmin/libraries/plugin_interface.lib.php

  3. Search for “if (! is_null($options) && count($options) > 0) {” or if not found then search for “if ($options != null && count($options) > 0) {”

Then replace it with “if ($options != null) {”

To search in Nano editor press CTRL and W

  1. Save the file (CTRL and O)

  2. Refresh the phpMyAdmin page and try agin.

I followed step 1 and it says that file doesn’t exist :/

It’s missing the underscore- WHICH is deleted by this editor (why? why?) Try this instead: sudo cp /usr/share/phpmyadmin/libraries/plugin _ interface.lib.php /usr/share/phpmyadmin/libraries/plugin _ interface.lib.php.bak without the SPACES around the UNDERSCORE

After testing it on PHP 7.2.10 you need to change that line like this: if ($options != null && count(array($options)) > 0) {

This solved both the LOAD error and the EXPORT error w Ubuntu 18.04 for me.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.