Voyage CDbException

CDbException

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

/home3/garagevinconneau/public_html/protected/models/Settings.php(53)

41                 $command = $connection->createCommand($sql);
42                 $command->bindValue(':variable', $attribute);
43                 $command->bindValue(':value', $this->$attribute);
44                 $command->execute();
45             }
46             return true;
47         }
48 
49         return false;
50     }
51 
52     public static function value($variable) {
53         $connection = Yii::app()->db;
54         $sql = 'SELECT * FROM settings WHERE variable = :variable';
55         $command = $connection->createCommand($sql);
56         $command->bindParam(":variable", $variable, PDO::PARAM_STR);
57         $row = $command->queryRow();
58         if ($row) {
59             return $row['value'];
60         }
61 
62         return false;
63     }
64 
65 }

Stack Trace

#4
+
 /home3/garagevinconneau/public_html/protected/models/Settings.php(53): CModule->__get("db")
48 
49         return false;
50     }
51 
52     public static function value($variable) {
53         $connection = Yii::app()->db;
54         $sql = 'SELECT * FROM settings WHERE variable = :variable';
55         $command = $connection->createCommand($sql);
56         $command->bindParam(":variable", $variable, PDO::PARAM_STR);
57         $row = $command->queryRow();
58         if ($row) {
#5
+
 /home3/garagevinconneau/public_html/protected/modules/pin/controllers/IndexController.php(26): Settings::value("pins_per_page")
21     public function actionIndex() {
22         $source = Yii::app()->request->getParam('source');
23         $user = Yii::app()->request->getParam('user');
24         $slug = Yii::app()->request->getParam('slug');
25         $id_category = Yii::app()->request->getParam('id_category');
26         $limit = Settings::value('pins_per_page');
27         $page = Yii::app()->request->getQuery('page');
28         $offset = (max($page, 1) - 1) * $limit;
29         $board = '';
30 
31         $q = new CDbCriteria(array(
#18
+
 /home3/garagevinconneau/public_html/index.php(22): CApplication->run()
17 $custom_config = json_decode(file_get_contents(dirname(__FILE__).'/protected/config/custom.php'), true);
18 $custom_config = $custom_config ? $custom_config : array();
19 $config = CMap::mergeArray($config,$custom_config);
20 
21 //print_r($config);exit;
22 Yii::createWebApplication($config)->run();
2019-02-22 23:33:17 Apache Yii Framework/1.1.13