CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. The SQL statement executed was: SHOW CREATE TABLE `hts_categories`

/var/www/html/protected/modules/item/controllers/ProductsController.php(146)

134         unset($_SESSION['frontend_images']);
135 
136         $itemModel = $this->loadModel($id);
137         $itemModel->views++;
138         $itemModel->save(false);
139         $this->fbtitle = $itemModel->name;
140         $this->fbimg = $itemModel->name;
141         $this->fbdescription = $itemModel->description;
142         $fbtitle = $itemModel->name;
143         $photoModel = $itemModel->photos;
144         //$commentModel = $itemModel->comments;
145 
146         $categoryModel = $itemModel->category0;
147         $subcategoryModel = $itemModel->subCategory0;
148         $userId = $itemModel->userId;
149 
150         $user = Yii::app()->user->id;
151 
152         if($itemModel->approvedStatus == 0)
153         {
154             if(!isset($user) && $user!=$itemModel->userId)
155             {
156                             $homeUrl = Yii::app()->createAbsoluteUrl('/');
157                             Yii::app()->user->setFlash("success",Yii::t('app','Product is waiting for admin approval'));
158                             $this->redirect($homeUrl);

Stack Trace

#13
+
 /var/www/html/protected/modules/item/controllers/ProductsController.php(146): CActiveRecord->__get("category0")
141         $this->fbdescription = $itemModel->description;
142         $fbtitle = $itemModel->name;
143         $photoModel = $itemModel->photos;
144         //$commentModel = $itemModel->comments;
145 
146         $categoryModel = $itemModel->category0;
147         $subcategoryModel = $itemModel->subCategory0;
148         $userId = $itemModel->userId;
149 
150         $user = Yii::app()->user->id;
151 
#28
+
 /var/www/html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 14:47:18 Apache/2.4.29 (Ubuntu) Yii Framework/1.1.16-dev