CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. The SQL statement executed was: SET default_storage_engine=;

/var/www/html/LimeSurvey-develop/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

#0
+
 /var/www/html/LimeSurvey-develop/application/models/SurveyActivator.php(418): CDbCommand->execute()
413      */
414     private function setMySQLDefaultEngine($dbEngine) {
415         $db = Yii::app()->db;
416         if (!empty($db) && $db->driverName === InstallerConfigForm::DB_TYPE_MYSQL) {
417             $db->createCommand(new CDbExpression(sprintf('SET default_storage_engine=%s;', $dbEngine)))
418                 ->execute();
419         }
420 
421     }
422 }
#1
+
 /var/www/html/LimeSurvey-develop/application/models/SurveyActivator.php(48): SurveyActivator->setMySQLDefaultEngine(false)
43         $this->event = new PluginEvent('beforeSurveyActivate');
44         $this->event->set('surveyId', $this->survey->primaryKey);
45         $this->event->set('simulate', $this->isSimulation);
46         App()->getPluginManager()->dispatchEvent($this->event);
47 
48         $this->setMySQLDefaultEngine(Yii::app()->getConfig('mysqlEngine'));
49 
50         if (!$this->showEventMessages()) {
51             return ['error'=>'plugin'];
52         }
53 
#2
+
 /var/www/html/LimeSurvey-develop/application/controllers/admin/surveyadmin.php(844): SurveyActivator->activate()
839                 $survey->savetimings = Yii::app()->request->getPost('savetimings');
840                 $survey->save();
841                 Survey::model()->resetCache(); // Make sure the saved values will be picked up
842             }
843 
844             $aResult = $surveyActivator->activate();
845 
846             $aViewUrls = array();
847             if ((isset($aResult['error']) && $aResult['error'] == 'plugin')
848                 || (isset($aResult['blockFeedback']) && $aResult['blockFeedback'])) {
849                 // Got false from plugin, redirect to survey front-page
2019-04-30 09:34:50 nginx/1.14.0 Yii Framework/1.1.21