I want to move this solution to the top of the heap, as it’s the only one that worked for me. This pertains to php7, phpmyadmin version 4.5.4.1deb2ubuntu2.1, on Ubuntu 16.04.

Try This First…

Manual Instructions

Most folks historically have been suggesting that you will have success if you edit the file /usr/share/phpmyadmin/libraries/sql.lib.ph .

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

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

Quick & Automated Method

It’s sed to the rescue! Paste the following command in your Ubuntu command line and run it.

sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php

Now restart the server by running:

sudo service apache2 restart

And test. If you’re still getting errors, move on to the next solution.


What Worked for Me

Again, I’m not sure if this was a lucky fluke or not. But if the above didn’t work, please try this.

We’re going to edit the file /usr/share/phpmyadmin/libraries/plugin_interface.lib.php

On or around Line 532 (very close to the end of the file),

replace:

if ($options != null && count($options) > 0) {

with:

if ($options != null && count((array)$options) > 0) {

Save that file. Restart your server using the command:sudo service apache2 restart

Log into phpmyadmin and test.

This worked for me. I was once again able to import and export!

I hope this works for you too. It won’t work for everyone. :( But there’s a chance this’ll help you not spend days on this issue, like I did. Good luck!! 👍

[Solved • 2019-03] Error 500 or ‘Parameter must be an array’ on phpmyadmin Export or Import
Tagged on:     
%d bloggers like this: