【发布时间】:2018-06-08 15:40:10
【问题描述】:
我已将备份上传到表,打开表我看到:
Warning in ./libraries/sql.lib.php#601
count(): Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2038: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#1984: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'alternativegirls',
string 'tgp_photo',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `tgp_photo`',
NULL,
NULL,
)
./sql.php#216: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'alternativegirls',
string 'tgp_photo',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `tgp_photo`',
NULL,
NULL,
)
./index.php#53: include(./sql.php)
在 phpMyAdmin...
PHP是7.2,服务器是Ubuntu 16.04,昨天安装的。
寻找我看到有些人在他们的代码中有这个错误,但是我在phpMyAdmin中没有找到任何人收到它...
我该怎么办?那是我的错误吗? phpmyadmin 错误?等更新?我回到 PHP 7.1?
【问题讨论】:
-
那些在CodeIgniter中遇到问题的人是:
if ( count($articles)){..},他们应该使用:if ( count((array)$articles)){..}作为here -
我在 phpmyadmin v4.6 上遇到了这个问题,我更新到 4.8 它消失了。 ,看起来它与mariadb 10.3有关,因为我在使用phpmyadmin 4.6的mariadb 10.1上没有这个问题
-
在我的情况下,当我的 phpMyAdmin 是 4.7.1 时安装 php 7.3 时出现问题,我切换回 php 7.0 并且它工作正常,或者您应该安装与 php 7.3 兼容的 phpMyAdmin 版本
标签: php phpmyadmin countable