CDbException

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

/var/www/html/eurekit/framework-1.1.14/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
+
 /var/www/html/eurekit/protected/views/site/jogos.php(7): CActiveRecord->findByPk()
02 
03 //$categoria=Pais::model()->find(array('condition'=>'cc="PT"'));
04 
05 if (isset($_GET['id'])) {
06 
07     $jogo=Modulo::model()->with('categoria')->findByPk($_GET['id']);
08 
09     if ($jogo != null) {
10         echo '<div style=" background-color:'.$jogo->categoria->cor.';" id="jogo">';//Posso tambem meter a facha de cima com cor do modulo ou da categoria logo que é como tá, é uma questão de como queira
11         
12         if(Yii::app()->language == 'en'){          
#12
+
 /var/www/html/eurekit/protected/controllers/SiteController.php(116): CController->render()
111         }
112         
113         public function actionJogos(){
114             $this->layout='//layouts/column2';
115             
116             $this->render('jogos');
117         }
118          
119        
120 //        public function actionHistorial(){
121 //            $this->layout='//layouts/column2';
#20
+
 /var/www/html/eurekit/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',true);//com true tá em modo de depuraçao para vermos erros a desenvolver e melhor
12 // specify how many levels of call stack should be shown in each log message
13 // defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14 
15 require_once($yii);
16 Yii::createWebApplication($config)->run();//Para aplicar a configuração, passamos o nome do arquivo de configuração como um parâmetro ao construtor da aplicação
17                                             //pasta config
2024-03-28 20:04:44 Apache/2.4.52 (Ubuntu) Yii Framework/1.1.14