PHP warning

PDOStatement::execute(): MySQL server has gone away

/data/home/www/dtk_php_cms_server/framework/db/CDbCommand.php(508)

496                 Yii::trace('Query result found in cache','system.db.CDbCommand');
497                 return $result[0];
498             }
499         }
500 
501         try
502         {
503             if($this->_connection->enableProfiling)
504                 Yii::beginProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
505 
506             $this->prepare();
507             if($params===array())
508                 $this->_statement->execute();
509             else
510                 $this->_statement->execute($params);
511 
512             if($method==='')
513                 $result=new CDbDataReader($this);
514             else
515             {
516                 $mode=(array)$mode;
517                 call_user_func_array(array($this->_statement, 'setFetchMode'), $mode);
518                 $result=$this->_statement->$method();
519                 $this->_statement->closeCursor();
520             }

Stack Trace

#4
+
 /data/home/www/dtk_php_cms_server/protected/util/PaoLiangHelper.php(195): CActiveRecord->findAll(CDbCriteria)
190         $c = intval($cid);
191         $countArray = Yii::app()->db->createCommand($sql)->queryRow(true, [':cid' => $c > 0 ? $c : 101]);
192         $count = $countArray['count_total'];
193         $is99 && $count = $countArray['count_cap10'];
194         $is20 && $count = $countArray['count_cap20'];
195         $goodsList = LingquanGoods::model()->findAll($criteria);
196         $ret = ['count' => $count, 'goodsList' => $goodsList];
197 
198         $this->setCache($keyStr, serialize($ret), 60);
199 
200         return $ret;
#5
+
 /data/home/www/dtk_php_cms_server/protected/controllers/LController.php(67): PaoLiangHelper->getLingQuan(null, "1844045", 0, 0, ...)
62             $result = $paoLiangHelper->getLingQuanES($kw, $cid, $is99, $is20, $isBoutique, $sort, $page - 1, $limit);
63         } else {
64             if(!$maxId){
65                 $maxId = $paoLiangHelper->getMaxId();
66             }
67             $result = $paoLiangHelper->getLingQuan($kw,$maxId, $cid, $is99, $is20, $isBoutique, $sort, ($page - 1) * $limit, $limit);
68         }
69         $gidArray = [];
70         foreach ($result['goodsList'] as $goods) {
71             $gidArray[] = $goods->id;
72         }
#13
+
 /data/home/www/dtk_php_cms_server/index.php(97): CApplication->run()
92 defined('YII_DEBUG') or define('YII_DEBUG', true);
93 // specify how many levels of call stack should be shown in each log message
94 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
95 
96 require_once($yii);
97 Yii::createWebApplication($config)->run();
2017-01-17 16:57:05 nginx/1.6.2 Yii Framework/1.1.16