CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1044] Access denied for user 'marshak_kids'@'%' to database 'base_marshak_maybe_kids'

/var/www/ndbmarshak.ru/kids/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

#7
+
 /var/www/ndbmarshak.ru/kids/ngin/components/BaseActiveRecord.php(9): CActiveRecord::model("Menu")
04 
05   public static function model($className=__CLASS__) {
06     $models = isset(Yii::app()->models) ? Yii::app()->models : array();
07     $className = HArray::val($models, $className, $className);
08     $className = Yii::import($className, true);
09     $model = parent::model($className);
10     $md = $model->getMetaData();
11     $relations = $md->relations;
12     foreach($relations AS $name => $relationClass) {
13       if (isset($models[$relationClass->className])) {
14         $className = Yii::import($models[$relationClass->className], false);
#8
+
 /var/www/ndbmarshak.ru/kids/ngin/modules/menu/models/Menu.php(50): BaseActiveRecord::model("Menu")
45    * @param string $className active record class name.
46    * @return Menu the static model class
47    */
48   public static function model($className=__CLASS__)
49   {
50     return parent::model($className);
51   }
52 
53   /**
54    * @return string the associated database table name
55    */
#9
+
 /var/www/ndbmarshak.ru/kids/ngin/modules/menu/models/Menu.php(163): Menu::model()
158   public function setRemovable($value) {
159     $this->removable = ($value ? 1 : 0);
160   }
161   
162   public static function getAll() {
163     return self::model()->getTree();
164   }
165   
166   protected function isStaticMenu() {
167     return empty($this->uri) && empty($this->external_link);
168   }
2024-03-28 17:59:42 Caddy/v2.4.6 Yii Framework/1.1.13