我试图找到这个问题的解决方案几个小时但到目前为止没有成功。在我之前尝试在Drupal 7站点中将几个模块更新到最新版本后,我在update.php页面上收到一条错误消息,说明存在一些PDO失败。
有谁知道造成这种情况的原因以及解决方法?
PDOException: 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.: SELECT name, schema_version FROM {system} WHERE type = :type; Array ( [:type] => module ) in drupal_get_installed_schema_version() (line 155 of /var/www/vhosts/xxxxxxx/httpdocs/includes/install.inc).
install.inc的第155行是SELECT调用:
if (!$versions) {
$versions = array();
$result = db_query("SELECT name, schema_version FROM {system} WHERE type = :type", array(':type' => 'module'));
foreach ($result as $row) {
$versions[$row->name] = $row->schema_version;
}
}
感谢您的帮助,任何线索都表示赞赏。
答案 0 :(得分:0)
不确定导致它的原因但是可能值得登录到mysql并运行flush tables;
这应该清除任何悬挂的内容。