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!
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.
Make a backup first sudo cp /usr/share/phpmyadmin/libraries/plugin_interface.lib.php /usr/share/phpmyadmin/libraries/plugin_interface.lib.php.bak
Edit the library sudo nano /usr/share/phpmyadmin/libraries/plugin_interface.lib.php
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
Save the file (CTRL and O)
Refresh the phpMyAdmin page and try agin.
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.