CDbException

CDbConnection failed to open the DB connection: SQLSTATE[42000] [1049] Unknown database 'directorio'

/usr/local/apache/htdocs-bio/yii-1.1.13.e9e4a0/framework/db/CDbConnection.php(381)

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

Stack Trace

#7
+
 /usr/local/apache/htdocs-bio/Difusion/SDB/2014/protected/models/Semana.php(49): CActiveRecord::model("Semana")
44      * @param string $className active record class name.
45      * @return Semana the static model class
46      */
47     public static function model($className=__CLASS__)
48     {
49         return parent::model($className);
50     }
51 
52     /**
53      * @return string the associated database table name
54      */
#8
+
 /usr/local/apache/htdocs-bio/Difusion/SDB/2014/protected/controllers/SemanaController.php(181): Semana::model()
176      * @return Semana the loaded model
177      * @throws CHttpException
178      */
179     public function loadModel($id)
180     {
181         $model=Semana::model()->findByPk($id);
182         if($model===null)
183             throw new CHttpException(404,'The requested page does not exist.');
184         return $model;
185     }
186 
#9
+
 /usr/local/apache/htdocs-bio/Difusion/SDB/2014/protected/controllers/SemanaController.php(55): SemanaController->loadModel("46")
50      * Displays a particular model.
51      * @param integer $id the ID of the model to be displayed
52      */
53     public function actionView($id)
54     {
55         $model=$this->loadModel($id);
56         $model_materiales=Materiales::model()->findAllByAttributes(array('semana_id'=>$model->id));
57 
58         $this->render('view',array(
59                 'model'=>$model,
60                 'model_materiales'=>$model_materiales,
2024-03-28 14:32:03 Apache/2.2.11 (Unix) mod_python/3.3.1 Python/2.5.1 mod_ssl/2.2.11 OpenSSL/0.9.8f PHP/5.2.6 mod_perl/2.0.4 Perl/v5.8.7 Yii Framework/1.1.13