CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused

/home/techxcite/www/htdocs/framework/yiilite.php(8761)

8749             if(empty($this->connectionString))
8750                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
8751             try
8752             {
8753                 $this->_pdo=$this->createPdoInstance();
8754                 $this->initConnection($this->_pdo);
8755                 $this->_active=true;
8756             }
8757             catch(PDOException $e)
8758             {
8759                 if(YII_DEBUG)
8760                 {
8761                     throw new CDbException('CDbConnection failed to open the DB connection: '.
8762                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
8763                 }
8764                 else
8765                 {
8766                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
8767                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
8768                 }
8769             }
8770         }
8771     }
8772     protected function close()
8773     {

Stack Trace

#7
+
 /home/techxcite/www/htdocs/protected/models/Pintopic.php(92): CActiveRecord->findByPk(1)
87     public static function getFix($limit)
88     {
89         $fix = array();
90         $count = 0;
91         for ($i=1;$i<=$limit;$i++) {
92             $fixTemp = self::model()->findByPK($i);
93             if ( $fixTemp->link != 0 ) {
94                 $titlesNormal = Title::model()->enable()->recently(($i*2)-1)->findAll();
95                 $titlesNormalId = array_values(CHtml::listData($titlesNormal,'index','index'));  
96         if (!(in_array($fixTemp->link,$titlesNormalId))) {
97                     $fix[$i] = $fixTemp->link;
#8
+
 /home/techxcite/www/htdocs/protected/controllers/MobileController.php(226): Pintopic::getFix(4)
221         Yii::app()->theme = 'newMobile';
222         $this->layout = '//layouts/main';
223         $this->pageTitle = 'TechXcite Mobile : page '.$page;
224         $this->subLayout = 'main';
225 
226         $fixTitle = Pintopic::getFix(4);
227         $firstpage = 12-$fixTitle['count'];
228         $perpage = 12; //for mobile only
229         $offset = $firstpage+($perpage*($page-2));
230 
231         $count=Title::model()->enable()->count()-$firstpage;
#18
+
 /home/techxcite/www/htdocs/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-28 22:51:38 nginx/1.14.0 Yii Framework/1.1.22