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' (2)

/home/admin/web/pinent.de/public_html/framework/db/CDbConnection.php(382)

370                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
371             try
372             {
373                 Yii::trace('Opening DB connection','system.db.CDbConnection');
374                 $this->_pdo=$this->createPdoInstance();
375                 $this->initConnection($this->_pdo);
376                 $this->_active=true;
377             }
378             catch(PDOException $e)
379             {
380                 if(YII_DEBUG)
381                 {
382                     throw new CDbException('CDbConnection failed to open the DB connection: '.
383                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
384                 }
385                 else
386                 {
387                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
388                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#7
+
 /home/admin/web/pinent.de/public_html/protected/models/Article.php(23): CActiveRecord::model("Article")
18      * @param string $className active record class name.
19      * @return Article the static model class
20      */
21     public static function model($className=__CLASS__)
22     {
23         return parent::model($className);
24     }
25 
26     /**
27      * @return string the associated database table name
28      */
#8
+
 /home/admin/web/pinent.de/public_html/protected/controllers/PartitionController.php(26): Article::model()
21                  throw new CHttpException(404,Yii::app()->params['error404']);
22              }
23             }
24             if(isset($_GET['section']))
25             {
26             $article_temp = Article::model()->findAllByAttributes(array('id_section'=>(int)$_GET['section'],'visible'=>'yes'),array('order'=>'position'));
27             $article = array();
28             foreach ($article_temp as $v)
29             {
30                $article[] = array('title_article'=>$v->title_article,'text_article'=>$v->text_article); 
31             }
#18
+
 /home/admin/web/pinent.de/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 01:10:57 Apache/2.2.15 (CentOS) Yii Framework/1.1.12