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 MariaDB server version for the right syntax to use near '' at line 11. The SQL statement executed was: CREATE TABLE `lime_auditlog_log` (
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`created` datetime,
`uid` varchar(255),
`entity` varchar(255),
`entityid` varchar(255),
`action` varchar(255),
`fields` text,
`oldvalues` text,
`newvalues` text
) ENGINE =

/mnt/data/shnoulle/nginx/www/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

#1
+
 /mnt/data/shnoulle/nginx/www/develop/application/libraries/PluginManager/LimesurveyApi.php(64): CDbCommand->createTable("lime_auditlog_log", array("id" => "pk", "created" => "datetime", "uid" => "string", "entity" => "string", ...), " ENGINE = ")
59      * @return integer number of rows affected by the execution.
60      */
61     public function createTable($plugin, $sTableName, $aColumns, $sOptions = null)
62     {
63         if (null !== $sTableName = $this->getTableName($plugin, $sTableName)) {
64             return App()->getDb()->createCommand()->createTable($sTableName, $aColumns, $sOptions);
65         }
66         return false;
67     }
68 
69     /**
#2
+
 /mnt/data/shnoulle/nginx/www/develop/plugins/AuditLog/AuditLog.php(573): LimeSurvey\PluginManager\LimesurveyApi->createTable(AuditLog, "lime_auditlog_log", array("id" => "pk", "created" => "datetime", "uid" => "string", "entity" => "string", ...), " ENGINE = ")
568                     'entity'=>'string',
569                     'entityid'=>'string',
570                     'action'=>'string',
571                     'fields'=>'text',
572                     'oldvalues'=>'text',
573                     'newvalues'=>'text'), $options);
574             }
575         }
576 
577         /**
578         * This event is fired by the administration panel to gather extra settings
#4
+
 /mnt/data/shnoulle/nginx/www/develop/application/libraries/PluginManager/PluginManager.php(258): call_user_func(array(AuditLog, "beforeActivate"))
253         if (isset($this->subscriptions[$eventName])) {
254             foreach ($this->subscriptions[$eventName] as $subscription) {
255                 if (!$event->isStopped()
256                  && (empty($target) || in_array(get_class($subscription[0]), $target))) {
257                     $subscription[0]->setEvent($event);
258                     call_user_func($subscription);
259                 }
260             }
261         }
262 
263         return $event;
2019-07-14 14:47:04 nginx/1.14.2 Yii Framework/1.1.21