接上篇:因为phpmyadmin瞎装之后,各种出错,以为弄好了,打开表格查询数据,竟然提示
“Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”
查阅了资料,是因为安装phpMyAdmin时,存储库中的版本(phpMyAdmin v4.6.6)与PHP 7.2+不完全兼容
此错误是因为/usr/share/phpmyadmin/libraries/sql.lib.php引起的,解决办法如下
首先,在编辑sql.lib.php之前备份文件
sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak
sudo vi /usr/share/phpmyadmin/libraries/sql.lib.php
将 (count($analyzed_sql_results['select_expr'] == 1)替换为 ((count($analyzed_sql_results['select_expr']) == 1)
参考 https://devanswers.co/problem-php-7-2-phpmyadmin-warning-in-librariessql-count/
版权声明:《 树莓派安装的打开phpMyAdmin反复警告Warning in ./libraries/sql.lib.php#613 count() 》为zhangkang原创文章,转载请注明出处!
最后编辑:2019-8-21 23:08:09