CDbException

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

/home/www/new.stlyrics.com/html/protected/models/songs/DbTxtInd.php(22)

10 
11     /**
12     * @return string the associated database table name
13     */
14     public function tableName()
15     {
16         return '{{db_txtind}}';
17     }
18     
19     public function bylink($link)
20     {
21         $this->getDbCriteria()->mergeWith(array(
22             'condition'=>$this->t.'.link=:link',
23             'params'=>array(':link' => $link),
24             'select'=>'id',
25         ));
26         return $this;
27     }
28     
29     public function getT()
30     {
31         return $this->getTableAlias(false);
32     }         
33            
34 }

Stack Trace

#8
+
 /home/www/new.stlyrics.com/html/protected/models/songs/DbTxtInd.php(22): CActiveRecord->__get("t")
17     }
18     
19     public function bylink($link)
20     {
21         $this->getDbCriteria()->mergeWith(array(
22             'condition'=>$this->t.'.link=:link',
23             'params'=>array(':link' => $link),
24             'select'=>'id',
25         ));
26         return $this;
27     }
#9
+
 /home/www/new.stlyrics.com/html/protected/controllers/songs/songs/TextController.php(9): DbTxtInd->bylink("changeisneverawasteoftime2282193")
04 {
05     public $adv = null;
06 
07     public function actionIndex($text)
08     {
09         $id = DbTxtInd::model()->bylink($text)->find()->id;
10         
11         $model = DbText::model()->with('artist', 'album', 'video', 'canonical')->findByPk($id);
12         
13 //        Идет запрос в таблицу канониклов, если есть песня с таким же текстом у этого артиста - возвращаем её урл и делаем 301
14         if (($c = $model->canonical->fronturi) !== null ) $this->redirect($c, true, 301);
#19
+
 /home/www/new.stlyrics.com/html/protected/components/WebApplicationEndBehavior.php(25): CApplication->run()
20         // Attach the changeModulePaths event handler
21         // and raise it.
22         $this->onModuleCreate = array($this, 'changeModulePaths');
23         $this->onModuleCreate(new CEvent($this->owner));
24  
25         $this->owner->run(); // Run application.
26     }
27  
28     // This event should be raised when CWebApplication
29     // or CWebModule instances are being initialized.
30     public function onModuleCreate($event)
2024-03-28 09:49:47 Apache/2.2.15 Yii Framework/1.1.14