服务器操作系统:LINUX
服务器环境:nginx1.4.7
php版本:php5.6.9
mysql版本:mysql5.5.34-log
开源框架:tpshop
报错详情:
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.
搜索到的解决办法:
application/database.php中第28行
// 数据库连接参数 ‘params‘ => [],
修改如下
// 数据库连接参数 ‘params‘ => array( ‘1002‘ => "SET NAMES utf8", #initial query ‘1000‘ => true, #PDO::MYSQL_ATTR_USE_BUFFERED_QUERY ),
修改后就不在报这个错误了