CDbException

CDbCommand n'a pas pu exécuter la commande SQL : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1711717393' for key 'uniqid'. The SQL statement executed was: INSERT INTO `visitors` (`creation_date`, `uniqid`, `user_agent`, `ip`, `referrer`, `utm_source`, `utm_campaign`, `utm_medium`, `utm_term`, `utm_content`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9). Bound with :yp0='2024-03-29 14:53:02', :yp1='1711717393', :yp2='claudebot', :yp3='54.92.135.47', :yp4='', :yp5='', :yp6='', :yp7='', :yp8='', :yp9=''

/home/networkolympus/public_html/framework/db/CDbCommand.php(357)

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

Stack Trace

#2
+
 /home/networkolympus/public_html/application/protected/components/DefaultController.php(163): CActiveRecord->save()
158         $visitor->utm_source = isset($_GET['utm_source']) ? $_GET['utm_source'] : '';
159         $visitor->utm_campaign = isset($_GET['utm_campaign']) ? $_GET['utm_campaign'] : '';
160         $visitor->utm_medium = isset($_GET['utm_medium']) ? $_GET['utm_medium'] : '';
161         $visitor->utm_term = isset($_GET['utm_term']) ? $_GET['utm_term'] : '';
162         $visitor->utm_content = isset($_GET['utm_content']) ? $_GET['utm_content'] : '';
163         $visitor->save();
164         $_SESSION['visitor_id'] = $visitor->id;
165     }
166 
167 
168     protected function createSeo(RActiveRecord $model){
#3
+
 /home/networkolympus/public_html/application/protected/components/DefaultController.php(124): DefaultController->createCookie()
119     protected function checkVisitor(){
120 
121         /** Первый вход */
122         if(!isset($_SESSION['visitor_id'])){
123             if(!isset($_COOKIE['visitor_uid'])){
124                 self::createCookie();
125             }else{
126                 $visitor = self::findVisitor();
127                 if($visitor) {
128                     $_SESSION['visitor_id'] = $visitor->id;
129                 }else{
#4
+
 /home/networkolympus/public_html/application/protected/components/DefaultController.php(114): DefaultController->checkVisitor()
109         }
110         */
111 
112         @session_start();
113 
114         self::checkVisitor();
115 
116         parent::init();
117     }
118 
119     protected function checkVisitor(){
2024-03-29 14:53:02 Apache Yii Framework/1.1.13