New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YumInstallController, the yum_translation.sql produce a mysql pdo error 2014: "MYSQL_ATTR_USE_BUFFERED_QUERY" #6
Comments
I never got this error, and i can not reproduce it now matter how hard i try. Which versions do you use (php, mysql, yii. apache)? |
@christiansalazar, running the SQL script from the mysql console will give you the SQL sentence that is failing. @thyseus, maybe putting a try/catch there might help to avoid the installer stop being executed. |
i dont know why it is happening: $sql = file_get_contents(Yii::getPathOfAlias('application.modules.user.docs') . '/yum_translation.sql'); the same sql script runned outside yii, is working fine....but dont from auto installer....misterious... i'll find a way to solve or detect this problem right now, but using a try/catch will bypass it... 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. AND YES...MYSQL_ATTR_USE_BUFFERED_QUERY Is Active..when calling execute().....now debugging it. |
SOLVED / BYPASSED: 1-move this etire block to be the last block AFTER the last $transaction->commit(). // Insert the translation strings that come with yum If you try to execute or commit any SQL statment after this then error 2014 occurs. WHY ? I dont know, maybe is related to the SQL script content itself...but moving this entire code block to the end AFTER the transaction->commit, it will by pass the problem without using try/catch. |
i need to remove this line and insert the script manually, because it block the automatic script execution, allowing only the users and translation tables to be created, the automatic installer hangs up.
commenting this line will solve the problem,
The text was updated successfully, but these errors were encountered: