CDbException

CDbException

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

/home/api2contrib/public_html/protected/components/MyActiveRecord.php(104)

092             else
093                 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.'));
094         }
095     }
096     
097     protected static function getForumDbConnection()
098     {
099         if(Yii::app()->params['dbcon']=='read'){
100             if (self::$dbforumread1 !== null)
101                 return self::$dbforumread1;
102             else
103             {
104                 self::$dbforumread1 = Yii::app()->dbforumread1;
105                 if (self::$dbforumread1 instanceof CDbConnection)
106                 {
107                     self::$dbforumread1->setActive(true);
108                     return self::$dbforumread1;
109                 }
110                 else
111                     throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.'));
112             }
113         }else{
114             if (self::$dbforum !== null)
115                 return self::$dbforum;
116             else

Stack Trace

#4
+
 /home/api2contrib/public_html/protected/components/MyActiveRecord.php(104): CModule->__get("dbforumread1")
099         if(Yii::app()->params['dbcon']=='read'){
100             if (self::$dbforumread1 !== null)
101                 return self::$dbforumread1;
102             else
103             {
104                 self::$dbforumread1 = Yii::app()->dbforumread1;
105                 if (self::$dbforumread1 instanceof CDbConnection)
106                 {
107                     self::$dbforumread1->setActive(true);
108                     return self::$dbforumread1;
109                 }
#5
+
 /home/api2contrib/public_html/protected/models/forum/ForumPosts.php(19): MyActiveRecord::getForumDbConnection()
14  */
15 class ForumPosts extends MyActiveRecord
16 {
17     public function getDbConnection()
18     {
19         return self::getForumDbConnection();
20     }
21     /**
22      * Returns the static model of the specified AR class.
23      * @param string $className active record class name.
24      * @return ForumPosts the static model class
#8
+
 /home/api2contrib/public_html/protected/models/forum/ForumPosts.php(29): CActiveRecord::model("ForumPosts")
24      * @return ForumPosts the static model class
25      */
26      
27     public static function model($className=__CLASS__)
28     {
29         return parent::model($className);
30     }
31 
32     /**
33      * @return string the associated database table name
34      */
2019-11-14 03:37:57 Apache/2.4.38 (cPanel) OpenSSL/1.0.2q mod_bwlimited/1.4 Yii Framework/1.1.13