CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1049] Unknown database 'welfare'

C:\AppServ\www\welfare\framework\db\CDbConnection.php(398)

386                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
387             try
388             {
389                 Yii::trace('Opening DB connection','system.db.CDbConnection');
390                 $this->_pdo=$this->createPdoInstance();
391                 $this->initConnection($this->_pdo);
392                 $this->_active=true;
393             }
394             catch(PDOException $e)
395             {
396                 if(YII_DEBUG)
397                 {
398                     throw new CDbException('CDbConnection failed to open the DB connection: '.
399                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
400                 }
401                 else
402                 {
403                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
404                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
405                 }
406             }
407         }
408     }
409 
410     /**

Stack Trace

#13
+
 C:\AppServ\www\welfare\protected\extensions\bootstrap\widgets\TbGridView.php(68): CGridView->init()
63      *
64      * Initializes the widget.
65      */
66     public function init()
67     {
68         parent::init();
69 
70         $classes = array('table');
71         if (isset($this->type)) {
72             if (is_string($this->type)) {
73                 $this->type = explode(' ', $this->type);
#16
+
 C:\AppServ\www\welfare\protected\views\site\index.php(41): CBaseController->widget("bootstrap.widgets.TbGridView", array("id" => "book-booking-grid", "dataProvider" => CActiveDataProvider, "type" => "striped bordered condensed hover", "enablePagination" => true, ...))
36                         
37            ),
38         'document_load',
39         'profile.firstname'
40     ),
41 ));
42 ?>
#21
+
 C:\AppServ\www\welfare\protected\controllers\SiteController.php(33): CController->render("index", array("dataProvider" => CActiveDataProvider))
28         $dataProvider = new CActiveDataProvider('DocDocument', array(
29             'sort' => array(
30                 'defaultOrder' => 'id DESC',
31             ),
32         ));
33         $this->render('index', array('dataProvider' => $dataProvider));
34     }
35 
36     /**
37      * This is the action to handle external exceptions.
38      */
2024-03-19 13:02:39 Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 Yii Framework/1.1.15-dev