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/galeria/view.php(2): CActiveRecord->findByPk()
1 <?php
2 $imp=Update::model()->findByPk($id);
3 
4 
5 
6     
7 
#12
+
 /var/www/html/eurekit/protected/controllers/SiteController.php(147): CController->render()
142         }
143         
144         public function actionViewGaleria($id){
145             $this->layout='//layouts/column2';
146             
147             $this->render('//galeria/view', array('id' => $id));
148         }
149         
150         public function actionGaleriaYear($year){
151             $this->layout='//layouts/column2';
152             
#22
+
 /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 18:59:39 Apache/2.4.52 (Ubuntu) Yii Framework/1.1.14