根据webman-admin手册 ,在【入门指引】/【安装】/第3步
访问 http://127.0.0.1:8787/app/admin/ 完成数据库相关配置
填好数据库信息后,报错:
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: -- -- Dumping data for table `wa_admin_roles` -- LOCK TABLES `wa_admin_roles` WRITE)
自行网上搜索相关信息,在webman/config/database.php中添加:
'params'=>[
PDO::ATTR_CASE => PDO::CASE_LOWER,
PDO::ATTR_EMULATE_PREPARES => true,
],
问题依然存在。
去数据库里查看表信息,发现有一张表:wa_admin_roles
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: -- -- Dumping data for table `wa_admin_roles` -- LOCK TABLES `wa_admin_roles` WRITE)
操作系统:ubuntu LTS 20.04
框架:webman
插件:webman-admin
在
plugin/admin/app/controller/InstallController.php
里getPdo()
方法$params
里加\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
试下首先非常感谢!
没有InstallController.php这个文件,需要自建吗?
找到了,plugin/admin/app/controller/common/InstallController.php