Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
^rooker
Site Admin
Posts: 1483 Joined: Fri Aug 29, 2003 8:39 pm
Post
by ^rooker » Tue Dec 08, 2020 12:12 am
[PROBLEM]
Using default phpmyadmin with default mysql on Ubuntu 18.04.4 server, I get the following warning when opening a database and selecting the option "Import":
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 '5fcea82cb224e',
string 'database',
string 'ca_filmdb',
string '',
integer 134217728,
array,
NULL,
NULL,
string '',
)
./db_import.php#43: PMA_getImportDisplay(
string 'database',
string 'ca_filmdb',
string '',
integer 134217728,
)
[SOLUTION]
I remember I already had and fixed this in the past, but I don't find any notes here on the forum...
Ah, here it is:
1)
Error in phpmyadmin Warning in ./libraries/plugin_interface.lib.php#551
Patch summary - Edit the following files in "
/usr/share/phpmyadmin/libraries ":
Code: Select all
--- plugin_interface.lib.php 2020-12-07 22:13:38.036457999 +0000
+++ plugin_interface.lib.php.org 2017-01-23 19:20:26.000000000 +0000
@@ -548,7 +548,7 @@
$ret .= '<h3>' . PMA_getString($text) . '</h3>';
$no_options = true;
- if ($options != null && count((array)$options) > 0) {
+ if ($options != null && count($options) > 0) {
foreach ($options->getProperties()
as $propertyMainGroup
) {
Then restart apache:
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
^rooker
Site Admin
Posts: 1483 Joined: Fri Aug 29, 2003 8:39 pm
Post
by ^rooker » Tue Dec 08, 2020 10:36 am
And another one:
(See
Github: phpmyadmin issue #15574 )
Warning in ./libraries/sql.lib.php#613
count(): Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'filmdb',
string 'ca_users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `ca_users`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'filmdb',
string 'ca_users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `ca_users`',
NULL,
NULL,
)
Patch:
Code: Select all
--- /usr/share/phpmyadmin/libraries/sql.lib.php 2020-12-08 08:37:50.236870999 +0000
+++ /usr/share/phpmyadmin/libraries/sql.lib.php.org 2020-12-07 22:08:05.645154738 +0000
@@ -610,7 +610,7 @@
|| $analyzed_sql_results['is_analyse'])
&& $analyzed_sql_results['select_from']
&& ((empty($analyzed_sql_results['select_expr']))
- || (count($analyzed_sql_results['select_expr']) == 1
+ || (count($analyzed_sql_results['select_expr'] == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*')))
&& count($analyzed_sql_results['select_tables']) == 1;
}
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!