CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1302 Conflicting declarations: 'CHARACTER SET utf8' and 'CHARACTER SET utf8mb4'. The SQL statement executed was: CREATE TABLE `lime_cpville_insee_cp` (
`insee` varchar(5) ,
`nom` text,
`cp` varchar(5) ,
`nomsimple` text,
`region` varchar(2) ,
`departement` varchar(2) ,
`menages` float,
`population` float,
`menagesint` int,
`populationint` int
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/framework/db/CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#1
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/application/libraries/PluginManager/LimesurveyApi.php(58): CDbCommand->createTable("lime_cpville_insee_cp", array("insee" => "string(5)", "nom" => "text", "cp" => "string(5)", "nomsimple" => "text", ...), "DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci")
53         */        
54         public function createTable($plugin, $sTableName, $aColumns, $sOptions=null)
55         {
56             if (null !== $sTableName = $this->getTableName($plugin, $sTableName))
57             {
58                 return App()->getDb()->createCommand()->createTable($sTableName,$aColumns,$sOptions);
59             }
60             return false;
61         }
62 
63         /**
#2
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/plugins/cpVille/cpVille.php(153): ls\pluginmanager\LimesurveyApi->createTable(cpVille, "insee_cp", array("insee" => "string(5)", "nom" => "text", "cp" => "string(5)", "nomsimple" => "text", ...), "DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci")
148                 'population'=>'float',
149                 'menagesint'=>'int',
150                 'populationint'=>'int',
151             ),
152             'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'
153             );
154             /* TODO : add index */
155             $this->addDataToTable();
156             $this->tableUpdated=true;
157         }
158         if($this->tableUpdated)
#3
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey/plugins/cpVille/cpVille.php(124): cpVille->insertInseeCp()
119             $this->getEvent()->set('success', false);
120             $this->getEvent()->set('message', 'This plugin is tested only withy MySQL, if you need this plugin, please contact <a href="http://sondages.pro/contact">Denis Chenu</a>.');
121         }
122         else
123         {
124             $this->insertInseeCp();
125         }
126     }
127 
128     private function insertInseeCp()
129     {
2016-03-20 11:34:02 Apache/2.2.22 (Debian) Yii Framework/1.1.17