CDbException

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

/home/www/spyzee.com/framework/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/www/spyzee.com/cp/protected/components/UserIdentity.php(20): CActiveRecord->findByAttributes()
15      * against some persistent user identity storage (e.g. database).
16      * @return boolean whether authentication succeeds.
17      */
18     public function authenticate()
19     {
20         $user = Users::model()->findByAttributes(array('email'=>$this->username));
21         
22         if ($user===null) { // No user found!
23             $this->errorCode=self::ERROR_USERNAME_INVALID;
24         } else if ($user->password !== md5($this->password)) { // Invalid password!
25             $this->errorCode=self::ERROR_PASSWORD_INVALID;
#8
+
 /home/www/spyzee.com/cp/protected/controllers/DemoController.php(45): UserIdentity->authenticate()
40                 $email = 'demo@spyzee.com';
41                 $password = 'demo';
42                     
43                 $identity = new UserIdentity($email, $password);
44                     
45                 $identity->authenticate();
46                     
47                 switch($identity->errorCode)
48                 {
49                     case UserIdentity::ERROR_NONE:
50                         $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
#16
+
 /home/www/spyzee.com/cp/index.php(17): CApplication->run()
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 
15 require_once($yii);
16 
17 Yii::createWebApplication($config)->run();
2024-03-19 02:05:39 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 Yii Framework/1.1.19