gpt4 book ai didi

php - Mysql apache2 - phpmyadmin 导入错误 (php 7.2)

转载 作者:行者123 更新时间:2023-11-29 07:28:53 25 4
gpt4 key购买 nike

我刚刚在运行 PHP 7.2 和 PhpMyAdmin 的 Apache2 上安装了虚拟主机,现在我正在尝试从旧服务器导入数据库。当我在 PhpMyAdmin 上单击导入时,出现此错误。

谁能帮我解决这个问题。

 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 'server',
string '',
string '',
string '<div> <a href="#" onclick="setSelectOptions(\'dump\', \' db_select[]\', true); return false;"> Select All </a> / <a href = "#" onclick = "setSelectOptions (\ 'dump \', \ 'db_select [] \', false); return false;"> Unfair all </a> <br /> <select name = "db_select []" id = "db_select" size = "10" multiple = "multiple"> <option value = "phpmyadmin" selected = "selected"> phpmyadmin </ option> </ select> </ div> ",
integer 0,
array
integer 0 ,
)
./server_export.php#47: PMA_getExportDisplay (
string 'server',
string '',
string '',
string '',
integer 0,
integer 0,
string '<div> <a href="#" onclick="setSelectOptions(\'dump\', \' db_select[]\', true); return false;"> Select All </a> / <a href = "#" onclick = "setSelectOptions (\ 'dump \', \ 'db_select [] \', false); return false;"> Unfair all </a> <br /> <select name = "db_select []" id = "db_select" size = "10" multiple = "multiple"> <option value = "phpmyadmin" selected = "selected"> phpmyadmin </ option> </ select> </ div> '

最佳答案

您好,以下完全解决了我同样的问题(导入/导出等):

https://medium.com/@chaloemphonthipkasorn/%E0%B9%81%E0%B8%81%E0%B9%89-bug-phpmyadmin-php7-2-ubuntu-16-04-92b287090b01

所以...在ubuntu 18.04、mysql、php7.2下:终端:

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

找到以下行(ctrl+f):

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

对我来说它在第 551 行

并更改以下内容:

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

ctrl+s 保存修改

在终端中:ctrl+c 返回提示...

和:sudo systemctl restart apache2

“我认为在新的 php 版本中。它不能使用 un 数组类型的 count() 或 sizeof()。将参数强制为数组是解决此错误的简单方法,...”

感谢原作者解决问题!我尝试分享它!

关于php - Mysql apache2 - phpmyadmin 导入错误 (php 7.2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52532651/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com