CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

/var/www/appstorelabs.com/www/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

#7
+
 /var/www/appstorelabs.com/www/protected/controllers/GoController.php(9): CActiveRecord->findByAttributes(array("short" => "uadMf"))
04 {
05     public $layout=false;
06 
07     public function actionIndex($short)
08     {
09         $shortUrl = ShortUrl::model()->findByAttributes(array('short'=>$short));
10         if ($shortUrl == null) {
11             throw new CHttpException(404, 'Not found');
12         }
13         $this->redirect($shortUrl->url);
14     }
#17
+
 /var/www/appstorelabs.com/www/index.php(21): CApplication->run()
16 //defined('YII_DEBUG_PROFILING') or define('YII_DEBUG_PROFILING',true);
17 //execution time
18 //defined('YII_DEBUG_DISPLAY_TIME') or define('YII_DEBUG_DISPLAY_TIME',true);
19 
20 require_once($yii);
21 Yii::createWebApplication($config)->run();
22 
23 /*if(YII_DEBUG_DISPLAY_TIME)
24 echo Yii::getLogger()->getExecutionTime();*/
2024-03-28 15:16:46 nginx Yii Framework/1.1.14