CDbException

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

/home2/lmaurban/public_html/yii/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

#9
+
 /home2/lmaurban/public_html/picoflic.com/protected/models/User.php(107): CActiveRecord->__construct()
102         return $votes;
103     }
104 
105     public static function checkUser() {
106         if (!isset($_SESSION['uid']) || empty($_SESSION['uid']) || !(User::model()->findByPk($_SESSION['uid']))) {
107             $u = new User();
108             $u->save();
109             $_SESSION['uid'] = $u->id;
110         }
111         return ($_SESSION['uid']);
112     }
#10
+
 /home2/lmaurban/public_html/picoflic.com/protected/controllers/SiteController.php(14): User::checkUser()
09     * Check session to check if a user is associated to it
10     * If session is empty, a guest user is created
11     */
12     public function beforeAction($a)
13     {
14         User::checkUser();
15         return (true);
16     }
17 
18     /**
19      * Declares class-based actions.
#17
+
 /home2/lmaurban/public_html/picoflic.com/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2023-04-05 08:56:18 Apache Yii Framework/1.1.13