Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in phpmyadmin Warning in ./libraries/plugin_interface.lib.php#551

Error:

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

Backtrace:

./libraries/display_export.lib.php#381: PMA_pluginGetOptions(
string 'Export',
array,
)
./libraries/display_export.lib.php#883: PMA_getHtmlForExportOptionsFormat(array)
./libraries/display_export.lib.php#1099: PMA_getHtmlForExportOptions(
string 'table',
string 'bpapluswpdb',
string 'wp_commentmeta',
string '',
integer 0,
array,
integer 0,
)
./tbl_export.php#143: PMA_getExportDisplay(
string 'table',
string 'bpapluswpdb',
string 'wp_commentmeta',
string '',
integer 0,
integer 0,
string '',
)

How can I fix it?

like image 269
Ahuraplus Avatar asked Mar 08 '19 15:03

Ahuraplus


2 Answers

Just edit the plugin _interface.lib.php

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

Find this line

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

Add (array) or replace with this

if ($options != null && count((array)$options) > 0) {
like image 154
Enrique Velasquez Avatar answered Oct 07 '22 11:10

Enrique Velasquez


This problem also occurs when you have an older version of phpMyAdmin which may not play well with newer PHP versions.

TO solve the issue:

1) Download the latest version of phpMyAdmin from https://www.phpmyadmin.net/.

2) Unzip the downloaded folder.

3) Copy all it's content to /usr/share/phpmyadmin.

Be sure all matching files and folders are being replaced with new ones (those you downloaded).

4) Restart apache: sudo systemctl restart apache2

All will work.

like image 22
Sergei Avatar answered Oct 07 '22 12:10

Sergei