/var/www/vhosts/vsaunu.com/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 |
+
–
/var/www/vhosts/vsaunu.com/framework/db/CDbConnection.php(331): CDbConnection->open() 326 public function setActive($value) 327 { 328 if($value!=$this->_active) 329 { 330 if($value) 331 $this->open(); 332 else 333 $this->close(); 334 } 335 } 336 |
#1 |
+
–
/var/www/vhosts/vsaunu.com/framework/db/CDbConnection.php(309): CDbConnection->setActive(true) 304 */ 305 public function init() 306 { 307 parent::init(); 308 if($this->autoConnect) 309 $this->setActive(true); 310 } 311 312 /** 313 * Returns whether the DB connection is established. 314 * @return boolean whether the DB connection is established |
#2 |
+
–
/var/www/vhosts/vsaunu.com/framework/base/CModule.php(388): CDbConnection->init() 383 if(!isset($config['enabled']) || $config['enabled']) 384 { 385 Yii::trace("Loading \"$id\" application component",'system.CModule'); 386 unset($config['enabled']); 387 $component=Yii::createComponent($config); 388 $component->init(); 389 return $this->_components[$id]=$component; 390 } 391 } 392 } 393 |
#3 |
+
–
/var/www/vhosts/vsaunu.com/framework/base/CApplication.php(431): CModule->getComponent("db") 426 * Returns the database connection component. 427 * @return CDbConnection the database connection 428 */ 429 public function getDb() 430 { 431 return $this->getComponent('db'); 432 } 433 434 /** 435 * Returns the error handler component. 436 * @return CErrorHandler the error handler application component. |
#4 |
+
–
/var/www/vhosts/vsaunu.com/framework/db/ar/CActiveRecord.php(624): CApplication->getDb() 619 { 620 if(self::$db!==null) 621 return self::$db; 622 else 623 { 624 self::$db=Yii::app()->getDb(); 625 if(self::$db instanceof CDbConnection) 626 return self::$db; 627 else 628 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 629 } |
#5 |
+
–
/var/www/vhosts/vsaunu.com/framework/db/ar/CActiveRecord.php(2311): CActiveRecord->getDbConnection() 2306 public function __construct($model) 2307 { 2308 $this->_model=$model; 2309 2310 $tableName=$model->tableName(); 2311 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2312 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2313 array('{class}'=>get_class($model),'{table}'=>$tableName))); 2314 if($table->primaryKey===null) 2315 { 2316 $table->primaryKey=$model->primaryKey(); |
#6 |
+
–
/var/www/vhosts/vsaunu.com/framework/db/ar/CActiveRecord.php(388): CActiveRecordMetaData->__construct(City) 383 if(isset(self::$_models[$className])) 384 return self::$_models[$className]; 385 else 386 { 387 $model=self::$_models[$className]=new $className(null); 388 $model->_md=new CActiveRecordMetaData($model); 389 $model->attachBehaviors($model->behaviors()); 390 return $model; 391 } 392 } 393 |
#7 |
+
–
/var/www/vhosts/vsaunu.com/protected/models/City.php(43): CActiveRecord::model("City") 38 * @param string $className active record class name. 39 * @return City the static model class 40 */ 41 public static function model($className=__CLASS__) 42 { 43 return parent::model($className); 44 } 45 46 /** 47 * @return string the associated database table name 48 */ |
#8 |
+
–
/var/www/vhosts/vsaunu.com/protected/components/CheckCity.php(22): City::model() 17 $session->open(); 18 19 if (empty($pathInfo[0])) 20 $pathInfo[0] = 'moscow'; 21 22 $city = City::model()->find(array( 23 'condition' => 'name = LOWER(:city) OR alias = LOWER(:city)', 24 'params' => array('city' => mb_strtolower($pathInfo[0], 'UTF-8')), 25 )); 26 27 if (!$city) |
#9 |
+
–
/var/www/vhosts/vsaunu.com/framework/web/CUrlManager.php(368): CheckCity->parseUrl(UrlManager, CHttpRequest, array("golitsinskie-bani"), "golitsinskie-bani") 363 $pathInfo=$this->removeUrlSuffix($rawPathInfo,$this->urlSuffix); 364 foreach($this->_rules as $i=>$rule) 365 { 366 if(is_array($rule)) 367 $this->_rules[$i]=$rule=Yii::createComponent($rule); 368 if(($r=$rule->parseUrl($this,$request,$pathInfo,$rawPathInfo))!==false) 369 return isset($_GET[$this->routeVar]) ? $_GET[$this->routeVar] : $r; 370 } 371 if($this->useStrictParsing) 372 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 373 array('{route}'=>$pathInfo))); |
#10 |
+
–
/var/www/vhosts/vsaunu.com/protected/components/UrlManager.php(76): CUrlManager->parseUrl(CHttpRequest) 71 return $secureRoute ? $this->secureHostInfo . $url : $url; 72 } 73 74 public function parseUrl($request) 75 { 76 $route = parent::parseUrl($request); 77 78 if(strpos($route, "min/serve") !== false) 79 return $route; 80 81 // для перенаправления на мобилы |
#11 |
+
–
/var/www/vhosts/vsaunu.com/framework/web/CWebApplication.php(141): UrlManager->parseUrl(CHttpRequest) 136 $route=$this->catchAllRequest[0]; 137 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 138 $_GET[$name]=$value; 139 } 140 else 141 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 142 $this->runController($route); 143 } 144 145 /** 146 * Registers the core application components. |
#12 |
+
–
/var/www/vhosts/vsaunu.com/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#13 |
+
–
/var/www/vhosts/vsaunu.com/www/index.php(19): CApplication->run() 14 defined('YII_DEBUG') or define('YII_DEBUG',true); 15 // specify how many levels of call stack should be shown in each log message 16 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 17 18 require_once($yii); 19 Yii::createWebApplication($config)->run(); |