/home/mirash32/public_html/KRC/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/mirash32/public_html/KRC/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/mirash32/public_html/KRC/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/mirash32/public_html/KRC/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/mirash32/public_html/KRC/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/mirash32/public_html/KRC/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/mirash32/public_html/KRC/framework/db/ar/CActiveRecord.php(2361): CActiveRecord->getDbConnection() 2356 public function __construct($model) 2357 { 2358 $this->_modelClassName=get_class($model); 2359 2360 $tableName=$model->tableName(); 2361 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2362 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2363 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2364 if($table->primaryKey===null) 2365 { 2366 $table->primaryKey=$model->primaryKey(); |
#6 |
+
–
/home/mirash32/public_html/KRC/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct(Contactform) 406 { 407 $className=get_class($this); 408 if(!array_key_exists($className,self::$_md)) 409 { 410 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 411 self::$_md[$className]=new CActiveRecordMetaData($this); 412 } 413 return self::$_md[$className]; 414 } 415 416 /** |
#7 |
+
–
/home/mirash32/public_html/KRC/framework/db/ar/CActiveRecord.php(79): CActiveRecord->getMetaData() 74 if($scenario===null) // internally used by populateRecord() and model() 75 return; 76 77 $this->setScenario($scenario); 78 $this->setIsNewRecord(true); 79 $this->_attributes=$this->getMetaData()->attributeDefaults; 80 81 $this->init(); 82 83 $this->attachBehaviors($this->behaviors()); 84 $this->afterConstruct(); |
#8 |
+
–
/home/mirash32/public_html/KRC/protected/controllers/front/SiteController.php(22): CActiveRecord->__construct() 17 $this->render('contactus'); 18 } */ 19 public function actionContact() { 20 21 $this->pageTitle.=' - Contact Us'; 22 $model = new Contactform; 23 if (isset($_POST['ajax']) && $_POST['ajax'] === 'contactus') { 24 echo CActiveForm::validate($model); 25 Yii::app()->end(); 26 } 27 if (isset($_POST['Contactform'])) { |
#9 |
+
–
/home/mirash32/public_html/KRC/framework/web/actions/CInlineAction.php(49): SiteController->actionContact() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 else 49 return $controller->$methodName(); 50 } 51 52 } |
#10 |
+
–
/home/mirash32/public_html/KRC/framework/web/CController.php(295): CInlineAction->runWithParams(array()) 290 */ 291 public function runAction($action) { 292 $priorAction = $this->_action; 293 $this->_action = $action; 294 if ($this->beforeAction($action)) { 295 if ($action->runWithParams($this->getActionParams()) === false) 296 $this->invalidActionParams($action); 297 else 298 $this->afterAction($action); 299 } 300 $this->_action = $priorAction; |
#11 |
+
–
/home/mirash32/public_html/KRC/framework/web/CController.php(276): CController->runAction(CInlineAction) 271 * @see createAction 272 * @see runAction 273 */ 274 public function runActionWithFilters($action, $filters) { 275 if (empty($filters)) 276 $this->runAction($action); 277 else { 278 $priorAction = $this->_action; 279 $this->_action = $action; 280 CFilterChain::create($this, $action, $filters)->run(); 281 $this->_action = $priorAction; |
#12 |
+
–
/home/mirash32/public_html/KRC/framework/web/CController.php(256): CController->runActionWithFilters(CInlineAction, array()) 251 public function run($actionID) { 252 if (($action = $this->createAction($actionID)) !== null) { 253 if (($parent = $this->getModule()) === null) 254 $parent = Yii::app(); 255 if ($parent->beforeControllerAction($this, $action)) { 256 $this->runActionWithFilters($action, $this->filters()); 257 $parent->afterControllerAction($this, $action); 258 } 259 } 260 else 261 $this->missingAction($actionID); |
#13 |
+
–
/home/mirash32/public_html/KRC/framework/web/CWebApplication.php(282): CController->run("contact") 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}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#14 |
+
–
/home/mirash32/public_html/KRC/framework/web/CWebApplication.php(141): CWebApplication->runController("site/Contact") 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. |
#15 |
+
–
/home/mirash32/public_html/KRC/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 /** |
#16 |
+
–
/home/mirash32/public_html/KRC/protected/components/WebApplicationEndBehavior.php(25): CApplication->run() 20 // Attach the changeModulePaths event handler 21 // and raise it. 22 $this->onModuleCreate = array($this, 'changeModulePaths'); 23 $this->onModuleCreate(new CEvent($this->owner)); 24 25 $this->owner->run(); // Run application. 26 } 27 28 // This event should be raised when CWebApplication 29 // or CWebModule instances are being initialized. 30 public function onModuleCreate($event) |
#17 |
+
–
/home/mirash32/public_html/KRC/framework/base/CComponent.php(261): WebApplicationEndBehavior->runEnd("front") 256 if($this->_m!==null) 257 { 258 foreach($this->_m as $object) 259 { 260 if($object->getEnabled() && method_exists($object,$name)) 261 return call_user_func_array(array($object,$name),$parameters); 262 } 263 } 264 if(class_exists('Closure', false) && $this->canGetProperty($name) && $this->$name instanceof Closure) 265 return call_user_func_array($this->$name, $parameters); 266 throw new CException(Yii::t('yii','{class} and its behaviors do not have a method or closure named "{name}".', |
#18 |
+
–
/home/mirash32/public_html/index.php(14): CComponent->__call("runEnd", array("front")) 09 defined('YII_DEBUG') or define('YII_DEBUG',true); 10 // specify how many levels of call stack should be shown in each log message 11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 12 13 require_once($yii); 14 Yii::createWebApplication($config)->runEnd('front'); |