Open GoogleCodeExporter opened 9 years ago
Have been trying to install this module for the past 2 days now. Its throwing
up an error
{{{
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;
}}}
On these lines of codes of the file:
\protected\modules\user\controllers\YumInstallController.php(134):
CDbCommand->execute()
{{{
if (isset($_POST['installUsergroup'])) {
$sql = "CREATE TABLE IF NOT EXISTS `" . $usergroupTable . "` (
`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;";
$db->createCommand($sql)->execute(); //throws exception on this line.
$createdTables['usergroup']['usergroupTable'] = $usergroupTable;
}}}
I have tried to use the line of code
{{{
$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
}}}
before running the queries. Still does not work.
1. Expected output is that the database tables should be created. What I see is
the error above.
2. Product version is yii-user-management_0.8rc5 on Windows 7 and using
WAMP(PHP: 5.2.6, Apache: 2.2.8, MySwl: 5.0.51b)
Original comment by kunalro...@gmail.com
on 13 Nov 2011 at 6:54
Problem is with:
$sql = file_get_contents(Yii::getPathOfAlias('application.modules.user.docs') .
'/yum_translation.sql');
$db->createCommand($sql)->execute();
Pdo buffer isn't cleared after this query. My quick solution is to remove above
code from lines 115 - 119 and running file yum_translation.sql directly from
PhpMyAdmin.
Original comment by gny...@gmail.com
on 16 Nov 2011 at 2:07
could you please elaborate? Everything is working fine on all my installations?
Original comment by thyseus
on 23 Dec 2011 at 11:12
Original issue reported on code.google.com by
rrakh...@gmail.com
on 22 Oct 2011 at 7:15