Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
YII用户管理模块安装错误-一般错误:2014_Yii - Fatal编程技术网

YII用户管理模块安装错误-一般错误:2014

YII用户管理模块安装错误-一般错误:2014,yii,Yii,在过去的两天中,我们一直在尝试安装此模块。这是一个错误 CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your cod

在过去的两天中,我们一直在尝试安装此模块。这是一个错误

CDbCommand failed to execute the SQL statement: 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.. The SQL statement executed was: CREATE TABLE IF NOT EXISTS `user_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner_id` int(11) NOT NULL,
`participants` text NULL,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
在文件的以下代码行中:\protected\modules\user\controllers\YumInstallController.php(134):CDbCommand->execute()

我试着使用代码行

$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
在运行查询之前。
我环顾了四周,但告诉我的解决方案对我不起作用。我是不是遗漏了什么?这里的任何帮助都将不胜感激

我通过在YumInstallController.PHP中注释以下几行来解决这个问题(当然我不打算使用翻译)


这里有一个类似的问题,其解决方案标记为有效:
$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
// Insert the translation strings that come with yum
//$sql = file_get_contents(Yii::getPathOfAlias(
//                           'application.modules.user.docs') . '/yum_translation.sql');
//$db->createCommand($sql)->execute();