在ubuntu上安装phpmyadmin后显示错误

时间:2018-04-05 08:58:33

标签: php ubuntu phpmyadmin

我在ubuntu 16.04上安装了phpmyadmin。

PHP版本是7.2

登录phpmyadmin后显示此错误:

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

Backtrace

./libraries/display_import.lib.php#368: PMA_pluginGetOptions(
string 'Import',
array,
)
./libraries/display_import.lib.php#453:     PMA_getHtmlForImportOptionsFormat(array)
./libraries/display_import.lib.php#684: PMA_getHtmlForImport(
string '5ac5e28f893ca',
string 'database',
string 'oro',
string '',
integer 2097152,
array,
NULL,
NULL,
string '',
)
./db_import.php#40: PMA_getImportDisplay(
string 'database',
string 'oro',
string '',
integer 2097152,
)

如何发出此问题?

2 个答案:

答案 0 :(得分:0)

编辑=> /usr/share/phpmyadmin/libraries/plugin_interface.lib.php

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

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

重新启动Apache => sudo service apache2 restart

答案 1 :(得分:-3)

如果您想安装php 7.2,请参阅。

apt-get install -y python-software-properties
add-apt-repository -y ppa:ondrej/php
apt-get update -y

apt-get install php7.2  -y 

apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-zip  php7.2-gd php7.2-
curl php7.2-xml php7.2-readline