CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user 'nicetouc'@'localhost' (using password: YES)

/home/nicetouc/public_html/_/engine/db/CDbConnection.php(399)

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

Stack Trace

#7
+
 /home/nicetouc/public_html/covid/dashboard/app/components/OverallTrend.php(11): CActiveRecord->count()
06         $title = "Patient distribution based on the Kenya's provinces.";
07         $color = "red";
08         Yii::app()->graph->mapDisplay($controller,$title,$total,$color);
09     }
10     public function samplePopulation($controller){
11         $patients     = Patient::model()->count();
12         $facilities = Facility::model()->count();
13         $clinics     = Clinic::model()->count();
14         $linked     = 137;
15         $str         ='';
16         $str .= Yii::app()->trend->numberDisplay($facilities,"Number of health facilities","navy");
#8
+
 /home/nicetouc/public_html/covid/dashboard/app/modules/user/views/user/dashboard.php(5): OverallTrend->samplePopulation(UserController)
01 <?php $this->renderPartial("//site/common/notifications"); ?>
02 <h1>OVERALL TRENDS</h1>
03 <div class="row data-div">
04 <p class="labels">Analytics on the sample population: number of health facilities, clinics, commobidities, and total number of patients considered.</p>
05         <?php echo Yii::app()->trend->samplePopulation($this);?>
06 </div>
07 
08 <div class="row data-div">
09 <div style="width:74%;float:left;margin-right:7px;">
10         <?php echo Yii::app()->trend->totalNoOfPatients($this);?>
#13
+
 /home/nicetouc/public_html/covid/dashboard/app/modules/user/controllers/UserController.php(5): CController->render("dashboard")
01 <?php
02 Yii::import('application.modules.pos.models.*');
03 class UserController extends GxController {
04     public function actionDashboard() {
05         $this->render('dashboard');
06     }
07     public function actionMachakos() {
08         $this->render('machakos');
09     }
10     public function actionFacilities() {
2024-03-29 14:52:31 Apache Yii Framework/1.1.16