CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory

/home/blogarama/new/framework/yiilite.php(8427)

8415             if(empty($this->connectionString))
8416                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
8417             try
8418             {
8419                 $this->_pdo=$this->createPdoInstance();
8420                 $this->initConnection($this->_pdo);
8421                 $this->_active=true;
8422             }
8423             catch(PDOException $e)
8424             {
8425                 if(YII_DEBUG)
8426                 {
8427                     throw new CDbException('CDbConnection failed to open the DB connection: '.
8428                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
8429                 }
8430                 else
8431                 {
8432                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
8433                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
8434                 }
8435             }
8436         }
8437     }
8438     protected function close()
8439     {

Stack Trace

#6
+
 /home/blogarama/new/protected/controllers/SiteController.php(774): CActiveRecord->cache(3600)
769         // if (isset($params['page']) && intval($params['page']) > 1) {
770             // die("Page: ".$page);
771         // }
772 
773         
774         $this->blog = Site::model()->with('text', 'owner')->cache(3600)->findByPk($siteID, array("limit"=>100, "together" => true));
775         
776         if ($this->blog == null || $this->blog->active == 0) {
777             header('Location: /');
778             //$this->render('404');
779             return;
#17
+
 /home/blogarama/new/index.php(230): CApplication->run()
225 
226 // print_r($_SERVER);
227 // print_r($_REQUEST);
228 
229 // create a Web application instance and run
230 Yii::createWebApplication($config)->run();
231 
232 
233  //print_r($_SESSION);
234 
235 /*
2024-03-28 09:05:55 Apache/2.4.6 (CentOS) PHP/7.0.23 Yii Framework/1.1.14