CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No route to host

/home/localplumberdire/public_html/yii/framework/db/CDbConnection.php(399)

387                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
388             try
389             {
390                 Yii::trace('Opening DB connection','system.db.CDbConnection');
391                 $this->_pdo=$this->createPdoInstance();
392                 $this->initConnection($this->_pdo);
393                 $this->_active=true;
394             }
395             catch(PDOException $e)
396             {
397                 if(YII_DEBUG)
398                 {
399                     throw new CDbException('CDbConnection failed to open the DB connection: '.
400                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
401                 }
402                 else
403                 {
404                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
405                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
406                 }
407             }
408         }
409     }
410 
411     /**

Stack Trace

#6
+
 /home/localplumberdire/public_html/protected/modules/main/controllers/DefaultController.php(1892): CActiveRecord->cache(2629746)
1887         
1888         $cri = new CDbCriteria();
1889         $cri->condition = "name Like :query";
1890         $cri->params = array(":query" => "%$cat_name%");
1891             
1892         if(!ServicesPages::model()->cache(2629746)->exists($cri))
1893         {
1894             $_cate=explode(" ",$cat_name);
1895             $cri = new CDbCriteria();
1896             $cri->condition = "name Like :query";
1897             $cri->params = array(":query" => "%$_cate[0]%");
#14
+
 /home/localplumberdire/public_html/index.php(51): CApplication->run()
46 
47 //    }
48 
49 //    PHPExcel_Shared_String::buildCharacterSets();
50 
51 $app->run();
2024-04-10 06:04:31 Apache Yii Framework/1.1.22