CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query. The SQL statement executed was: SHOW CREATE TABLE `article_photo_gallery_block`

/var/www/html/protected/libs/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#14
+
 /var/www/html/protected/models/articles/News.php(241): CActiveRecord->findAll(array("order" => "newsInfo.starting_date DESC", "condition" => "t.type = 'event' AND status = 'published' AND t.is_verified = 1", "limit" => null))
236             'galleryBlocks',
237         ])->findAll([
238             'order' => 'newsInfo.starting_date DESC',
239             'condition' => 't.type = \'' . $type . '\' AND status = \'published\' AND t.is_verified = 1',
240             'limit' => $count
241         ]);
242 
243         return $news;
244     }
245 
246     public static function getAllNewsListForTable($siteId = null, $start = 0, $count = 10, $type = 'news')
#15
+
 /var/www/html/protected/controllers/SiteController.php(1100): News::getList("57", null, "event")
1095         }
1096 
1097         shuffle($relatedArticles);
1098         $event->relatedArticles = array_slice($relatedArticles, 0, 6);
1099 
1100         $eventsList = News::getList($this->currentSiteId, null, 'event');
1101 
1102         $blocks = $event->getBlocks();
1103 
1104         foreach ($blocks as $block) {
1105             if ($block->getClassName() == 'ArticleTextWithQuoteBlock') {
#25
+
 /var/www/html/index.php(17): CApplication->run()
12 defined('YII_DEBUG') or define('YII_DEBUG', Config::$debug);
13 
14 require_once ROOT_PATH . '/protected/libs/framework/yii.php' ;
15 $config = ROOT_PATH . '/configs/yii.php';
16 
17 Yii::createWebApplication($config)->run();
2024-03-29 18:54:46 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.14
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. The SQL statement executed was: SELECT `id` FROM `session` WHERE id=:id. Bound with :id='upe6hqsfnavv0om5ql3itij490'