/www/wwwroot/gshvalve.com/framework/db/CDbConnection.php(399)
387 throw new CDbException('CDbConnection.connectionString cannot be empty.'); 388 try 389 { 390 Yii::trace('Opening DB connection','system.db.CDbConnection'); 391 $this->_pdo=$this->createPdoInstance(); 392 $this->initConnection($this->_pdo); 393 $this->_active=true; 394 } 395 catch(PDOException $e) 396 { 397 if(YII_DEBUG) 398 { 399 throw new CDbException('CDbConnection failed to open the DB connection: '. 400 $e->getMessage(),(int)$e->getCode(),$e->errorInfo); 401 } 402 else 403 { 404 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 405 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo); 406 } 407 } 408 } 409 } 410 411 /**
#0 |
+
–
/www/wwwroot/gshvalve.com/framework/db/CDbConnection.php(347): CDbConnection->open() 342 public function setActive($value) 343 { 344 if($value!=$this->_active) 345 { 346 if($value) 347 $this->open(); 348 else 349 $this->close(); 350 } 351 } 352 |
#1 |
+
–
/www/wwwroot/gshvalve.com/framework/db/CDbConnection.php(325): CDbConnection->setActive(true) 320 */ 321 public function init() 322 { 323 parent::init(); 324 if($this->autoConnect) 325 $this->setActive(true); 326 } 327 328 /** 329 * Returns whether the DB connection is established. 330 * @return boolean whether the DB connection is established |
#2 |
+
–
/www/wwwroot/gshvalve.com/framework/base/CModule.php(393): CDbConnection->init() 388 if(!isset($config['enabled']) || $config['enabled']) 389 { 390 Yii::trace("Loading \"$id\" application component",'system.CModule'); 391 unset($config['enabled']); 392 $component=Yii::createComponent($config); 393 $component->init(); 394 return $this->_components[$id]=$component; 395 } 396 } 397 } 398 |
#3 |
+
–
/www/wwwroot/gshvalve.com/framework/base/CApplication.php(458): CModule->getComponent("db") 453 * Returns the database connection component. 454 * @return CDbConnection the database connection 455 */ 456 public function getDb() 457 { 458 return $this->getComponent('db'); 459 } 460 461 /** 462 * Returns the error handler component. 463 * @return CErrorHandler the error handler application component. |
#4 |
+
–
/www/wwwroot/gshvalve.com/framework/db/ar/CActiveRecord.php(637): CApplication->getDb() 632 { 633 if(self::$db!==null) 634 return self::$db; 635 else 636 { 637 self::$db=Yii::app()->getDb(); 638 if(self::$db instanceof CDbConnection) 639 return self::$db; 640 else 641 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 642 } |
#5 |
+
–
/www/wwwroot/gshvalve.com/framework/db/ar/CActiveRecord.php(1431): CActiveRecord->getDbConnection() 1426 { 1427 if($checkScopes && ($criteria=$this->getDbCriteria(false))!==null && $criteria->alias!='') 1428 $alias=$criteria->alias; 1429 else 1430 $alias=$this->_alias; 1431 return $quote ? $this->getDbConnection()->getSchema()->quoteTableName($alias) : $alias; 1432 } 1433 1434 /** 1435 * Sets the table alias to be used in queries. 1436 * @param string $alias the table alias to be used in queries. The alias should NOT be quoted. |
#6 |
+
–
/www/wwwroot/gshvalve.com/framework/db/ar/CActiveRecord.php(1487): CActiveRecord->getTableAlias(true) 1482 * @return static the record found. Null if none is found. 1483 */ 1484 public function findByPk($pk,$condition='',$params=array()) 1485 { 1486 Yii::trace(get_class($this).'.findByPk()','system.db.ar.CActiveRecord'); 1487 $prefix=$this->getTableAlias(true).'.'; 1488 $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params,$prefix); 1489 return $this->query($criteria); 1490 } 1491 1492 /** |
#7 |
+
–
/www/wwwroot/gshvalve.com/protected/components/Controller.php(25): CActiveRecord->findByPk(1) 20 * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links} 21 * for more details on how to specify this property. 22 */ 23 public $breadcrumbs=array(); 24 public function init(){ 25 $this->optionInfo=Option::model()->findByPk(1); 26 } 27 } |
#8 |
+
–
/www/wwwroot/gshvalve.com/framework/web/CWebApplication.php(281): Controller->init() 276 if(($ca=$this->createController($route))!==null) 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', |
#9 |
+
–
/www/wwwroot/gshvalve.com/framework/web/CWebApplication.php(141): CWebApplication->runController("article/index/cid/12") 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. 146 * This method overrides the parent implementation by registering additional core components. |
#10 |
+
–
/www/wwwroot/gshvalve.com/framework/base/CApplication.php(184): CWebApplication->processRequest() 179 public function run() 180 { 181 if($this->hasEventHandler('onBeginRequest')) 182 $this->onBeginRequest(new CEvent($this)); 183 register_shutdown_function(array($this,'end'),0,false); 184 $this->processRequest(); 185 if($this->hasEventHandler('onEndRequest')) 186 $this->onEndRequest(new CEvent($this)); 187 } 188 189 /** |
#11 |
+
–
/www/wwwroot/gshvalve.com/common.php(13): CApplication->run() 08 // specify how many levels of call stack should be shown in each log message 09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 5); 10 require_once($yii); 11 $app = Yii::createWebApplication($config); 12 require_once($globals); 13 $app->run(); |
#12 |
+
–
/www/wwwroot/gshvalve.com/index.php(14): require_once("/www/wwwroot/gshvalve.com/common.php") 09 }else{ 10 $config=dirname(__FILE__).'/protected/config/main.php'; 11 } 12 13 $globals = dirname(__FILE__) . '/protected/globals.php'; 14 require_once('./common.php'); |