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/imprensa.php(50): CActiveRecord->findByPk()
45         echo '<p>'.Yii::t('conteudo','De momento não dispomos de conteúdo para apresentar').'</p>';
46     }
47     
48 } else {
49 
50     $imp=Update::model()->findByPk($_GET['id']);
51 
52     if ($imp != null) {
53         
54         echo '<div style=" background-color: #0066B3;" 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
55 
#12
+
 /var/www/html/eurekit/protected/controllers/SiteController.php(129): CController->render()
124 //        }
125         
126         public function actionImprensa(){
127             $this->layout='//layouts/column2';
128             
129             $this->render('imprensa');
130         }
131         
132         public function actionVideos(){
133             $this->layout='//layouts/column2';
134             
#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-29 00:30:45 Apache/2.4.52 (Ubuntu) Yii Framework/1.1.14