CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 104

/home/u37420/yii14/framework/db/CDbConnection.php(382)

370                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
371             try
372             {
373                 Yii::trace('Opening DB connection','system.db.CDbConnection');
374                 $this->_pdo=$this->createPdoInstance();
375                 $this->initConnection($this->_pdo);
376                 $this->_active=true;
377             }
378             catch(PDOException $e)
379             {
380                 if(YII_DEBUG)
381                 {
382                     throw new CDbException('CDbConnection failed to open the DB connection: '.
383                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
384                 }
385                 else
386                 {
387                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
388                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#7
+
 /home/u37420/blago.u37420.netangels.ru/www/protected/modules/text/models/TextCategory.php(145): CActiveRecord->findByAttributes(array("url" => "gallery"))
140             ),
141         ));
142     }
143 
144     public static function getObjectByUrl($url) {
145         return self::model()->findByAttributes(array('url'=>$url));
146     }
147 
148     public static function loadModel($id) {
149         $model = TextCategory::model()->findByPk($id);
150         if($model===null) {
#8
+
 /home/u37420/blago.u37420.netangels.ru/www/protected/modules/text/components/TextUrlRule.php(37): TextCategory::getObjectByUrl("gallery")
32 
33     public function parseUrl($manager, $request, $pathInfo, $rawPathInfo) {
34         $matches = explode('/',$pathInfo);
35         if (!empty($matches)) {
36             if (count($matches) > 1) {
37                 $textCategory = TextCategory::getObjectByUrl($matches[0]);
38                 if($textCategory){
39                     if(count($matches)%2) {
40                         $_GET['category_id'] = $_REQUEST['category_id'] = $textCategory->id;
41                         $this->parseParameters(array_slice($matches,1));
42                         return 'text/text/index';
#12
+
 /home/u37420/blago.u37420.netangels.ru/www/index.php(45): CApplication->run()
40     public static function app() {
41         return parent::app();
42     }
43 }
44 
45 Yii::createWebApplication($config)->run();
2024-03-28 13:52:06 Apache/2.2.22 (Debian) Yii Framework/1.1.14