/home/u37420/yii14/framework/db/CDbConnection.php(382)
370 throw new CDbException('CDbConnection.connectionString cannot be empty.'); 371 try 372 { 373 Yii::trace('Opening DB connection','system.db.CDbConnection'); 374 $this->_pdo=$this->createPdoInstance(); 375 $this->initConnection($this->_pdo); 376 $this->_active=true; 377 } 378 catch(PDOException $e) 379 { 380 if(YII_DEBUG) 381 { 382 throw new CDbException('CDbConnection failed to open the DB connection: '. 383 $e->getMessage(),(int)$e->getCode(),$e->errorInfo); 384 } 385 else 386 { 387 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 388 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo); 389 } 390 } 391 } 392 } 393 394 /**
#0 |
+
–
/home/u37420/yii14/framework/db/CDbConnection.php(330): CDbConnection->open() 325 public function setActive($value) 326 { 327 if($value!=$this->_active) 328 { 329 if($value) 330 $this->open(); 331 else 332 $this->close(); 333 } 334 } 335 |
#1 |
+
–
/home/u37420/yii14/framework/db/CDbConnection.php(308): CDbConnection->setActive(true) 303 */ 304 public function init() 305 { 306 parent::init(); 307 if($this->autoConnect) 308 $this->setActive(true); 309 } 310 311 /** 312 * Returns whether the DB connection is established. 313 * @return boolean whether the DB connection is established |
#2 |
+
–
/home/u37420/yii14/framework/base/CModule.php(387): CDbConnection->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#3 |
+
–
/home/u37420/yii14/framework/base/CApplication.php(450): CModule->getComponent("db") 445 * Returns the database connection component. 446 * @return CDbConnection the database connection 447 */ 448 public function getDb() 449 { 450 return $this->getComponent('db'); 451 } 452 453 /** 454 * Returns the error handler component. 455 * @return CErrorHandler the error handler application component. |
#4 |
+
–
/home/u37420/yii14/framework/db/ar/CActiveRecord.php(634): CApplication->getDb() 629 { 630 if(self::$db!==null) 631 return self::$db; 632 else 633 { 634 self::$db=Yii::app()->getDb(); 635 if(self::$db instanceof CDbConnection) 636 return self::$db; 637 else 638 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 639 } |
#5 |
+
–
/home/u37420/yii14/framework/db/ar/CActiveRecord.php(1428): CActiveRecord->getDbConnection() 1423 { 1424 if($checkScopes && ($criteria=$this->getDbCriteria(false))!==null && $criteria->alias!='') 1425 $alias=$criteria->alias; 1426 else 1427 $alias=$this->_alias; 1428 return $quote ? $this->getDbConnection()->getSchema()->quoteTableName($alias) : $alias; 1429 } 1430 1431 /** 1432 * Sets the table alias to be used in queries. 1433 * @param string $alias the table alias to be used in queries. The alias should NOT be quoted. |
#6 |
+
–
/home/u37420/yii14/framework/db/ar/CActiveRecord.php(1517): CActiveRecord->getTableAlias(true) 1512 * @return CActiveRecord the record found. Null if none is found. 1513 */ 1514 public function findByAttributes($attributes,$condition='',$params=array()) 1515 { 1516 Yii::trace(get_class($this).'.findByAttributes()','system.db.ar.CActiveRecord'); 1517 $prefix=$this->getTableAlias(true).'.'; 1518 $criteria=$this->getCommandBuilder()->createColumnCriteria($this->getTableSchema(),$attributes,$condition,$params,$prefix); 1519 return $this->query($criteria); 1520 } 1521 1522 /** |
#7 |
+
–
/home/u37420/blago.u37420.netangels.ru/www/protected/modules/text/models/TextCategory.php(145): CActiveRecord->findByAttributes(array("url" => "gallery")) 140 ), 141 )); 142 } 143 144 public static function getObjectByUrl($url) { 145 return self::model()->findByAttributes(array('url'=>$url)); 146 } 147 148 public static function loadModel($id) { 149 $model = TextCategory::model()->findByPk($id); 150 if($model===null) { |
#8 |
+
–
/home/u37420/blago.u37420.netangels.ru/www/protected/modules/text/components/TextUrlRule.php(37): TextCategory::getObjectByUrl("gallery") 32 33 public function parseUrl($manager, $request, $pathInfo, $rawPathInfo) { 34 $matches = explode('/',$pathInfo); 35 if (!empty($matches)) { 36 if (count($matches) > 1) { 37 $textCategory = TextCategory::getObjectByUrl($matches[0]); 38 if($textCategory){ 39 if(count($matches)%2) { 40 $_GET['category_id'] = $_REQUEST['category_id'] = $textCategory->id; 41 $this->parseParameters(array_slice($matches,1)); 42 return 'text/text/index'; |
#9 |
+
–
/home/u37420/yii14/framework/web/CUrlManager.php(370): TextUrlRule->parseUrl(CUrlManager, CHttpRequest, "gallery/2032018", "gallery/2032018") 365 $pathInfo=$this->removeUrlSuffix($rawPathInfo,$this->urlSuffix); 366 foreach($this->_rules as $i=>$rule) 367 { 368 if(is_array($rule)) 369 $this->_rules[$i]=$rule=Yii::createComponent($rule); 370 if(($r=$rule->parseUrl($this,$request,$pathInfo,$rawPathInfo))!==false) 371 return isset($_GET[$this->routeVar]) ? $_GET[$this->routeVar] : $r; 372 } 373 if($this->useStrictParsing) 374 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 375 array('{route}'=>$pathInfo))); |
#10 |
+
–
/home/u37420/yii14/framework/web/CWebApplication.php(140): CUrlManager->parseUrl(CHttpRequest) 135 $route=$this->catchAllRequest[0]; 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. |
#11 |
+
–
/home/u37420/yii14/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
#12 |
+
–
/home/u37420/blago.u37420.netangels.ru/www/index.php(45): CApplication->run() 40 public static function app() { 41 return parent::app(); 42 } 43 } 44 45 Yii::createWebApplication($config)->run(); |