最近在xubuntu 18.04 LTS 安裝 apache2、php 7.2、phpmyadmin與 MariaDB。當我進入phpmyadmin,出現這樣的錯誤訊息:
Warning in ./libraries/sql.lib.php#613
count(): Parameter must be an array or an object that implements Countable
解決方式:
1.備份sql.lib.php
$sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak
2.編輯sql.lib.php
$sudo geany /usr/share/phpmyadmin/libraries/sql.lib.php
3.將 (count($analyzed_sql_results['select_expr'] == 1) 改為((count($analyzed_sql_results['select_expr']) == 1),實際上只是要新增個括號 )
4.儲存
資料來源: