【问题标题】:Show error after install phpmyadmin on ubuntu在 ubuntu 上安装 phpmyadmin 后显示错误
【发布时间】:2018-09-15 00:42:57
【问题描述】:

我在 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,
)

如何发出这个问题?

【问题讨论】:

  • 你用的是什么版本的phpmyadmin?尝试更新到最新的稳定版本。以前的版本与 PHP 7.2 有问题
  • @wayneOS 你好,如何安装稳定版?
  • @wayneOS 如何查看phpmyadmin版本?
  • 如果您在登录后看不到主页,这是个好问题。我很快就会回来找你。必须自己检查。
  • 好的,/usr/share/phpmyadmin 下是一个文件 RELEASE-DATE-*,其中包含您当前的版本,而不是 *

标签: php ubuntu phpmyadmin


【解决方案1】:

编辑 => /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

【讨论】:

    【解决方案2】:

    如果要安装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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-01
      • 2016-10-17
      • 2012-09-02
      • 2015-01-09
      • 1970-01-01
      • 2016-08-24
      • 2018-07-11
      • 2012-10-29
      相关资源
      最近更新 更多