Hi guys now i am getting a long CDbException Error as below:
CDbException
CDbConnection.connectionString cannot be empty.
/home/theinjsl/public_html/testinfo/framework/db/CDbConnection.php(369)
357 return $this;
358 }
359
360 /**
361 * Opens DB connection if it is currently not
362 * @throws CException if connection fails
363 */
364 protected function open()
365 {
366 if($this->_pdo===null)
367 {
368 if(empty($this->connectionString))
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: '.
Stack Trace
#0
/home/theinjsl/public_html/testinfo/framework/db/CDbConnection.php(330): CDbConnection->open()
#1
/home/theinjsl/public_html/testinfo/framework/db/CDbConnection.php(308): CDbConnection->setActive(true)
#2
/home/theinjsl/public_html/testinfo/framework/base/CModule.php(387): CDbConnection->init()
#3
/home/theinjsl/public_html/testinfo/framework/base/CApplication.php(438): CModule->getComponent("db")
#4
/home/theinjsl/public_html/testinfo/framework/db/ar/CActiveRecord.php(623): CApplication->getDb()
#5
/home/theinjsl/public_html/testinfo/framework/db/ar/CActiveRecord.php(2309): CActiveRecord->getDbConnection()
#6
/home/theinjsl/public_html/testinfo/framework/db/ar/CActiveRecord.php(387): CActiveRecordMetaData->__construct(User)
#7
/home/theinjsl/public_html/testinfo/framework/db/ar/CActiveRecord.php(402): CActiveRecord::model("User")
#8
/home/theinjsl/public_html/testinfo/framework/db/ar/CActiveRecord.php(77): CActiveRecord->getMetaData()
#9
–
/home/theinjsl/public_html/themes/fancy/views/layouts/header.php(23): CActiveRecord->__construct()
18 <?php
19 echo CHtml::link(‘Register’, Yii::app()->urlManager->baseUrl . ‘/register’);
20 }
21
22
23 $userModel = new User();
24 $userRec = $userModel->getUserRecById();
25 ?>
26 </div>
27 <div class="logo left">
28 <?php echo CHtml::link(CHtml::image(AppHelper::getAsset(‘img/logo.gif’)), Yii::app()->urlManager->baseUrl); ?>
#10
–
/home/theinjsl/public_html/themes/fancy/views/layouts/main.php(55): include_once("/home/theinjsl/public_html/themes/fancy/views/layouts/header.php")
50 }
51
52 </script>
53
54 <div class="mainpage">
55 <?php include_once(‘header.php’); ?>
56 <!–div class="slider-holder"> </div–>
57 <?php
58 if (Yii::app()->request->pathInfo == ‘’)
59 {
60 ?>
#11
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(126): require("/home/theinjsl/public_html/themes/fancy/views/layouts/main.php")
#12
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/theinjsl/public_html/themes/fancy/views//layouts/main.php", array("content" => " <!–div id="content"–> <!–SEPERATOR–> <div class="s…"), true)
#13
/home/theinjsl/public_html/testinfo/framework/web/widgets/CContentDecorator.php(76): CBaseController->renderFile("/home/theinjsl/public_html/themes/fancy/views//layouts/main.php", array("content" => " <!–div id="content"–> <!–SEPERATOR–> <div class="s…"), true)
#14
/home/theinjsl/public_html/testinfo/framework/web/widgets/CContentDecorator.php(54): CContentDecorator->decorate(" <!–div id="content"–> <!–SEPERATOR–> <div class="s…")
#15
/home/theinjsl/public_html/testinfo/framework/web/widgets/COutputProcessor.php(44): CContentDecorator->processOutput(" <!–div id="content"–> <!–SEPERATOR–> <div class="s…")
#16
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(206): COutputProcessor->run()
#17
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(300): CBaseController->endWidget("CContentDecorator")
#18
–
/home/theinjsl/public_html/themes/fancy/views/layouts/column1.php(15): CBaseController->endContent()
10 <?php endif ?>
11 <!–div id="content"–>
12 <?php echo $content; ?>
13 <!–/div>< content -->
14 </div>
15 <?php $this->endContent(); ?>
#19
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(126): require("/home/theinjsl/public_html/themes/fancy/views/layouts/column1.ph…")
#20
/home/theinjsl/public_html/testinfo/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/theinjsl/public_html/themes/fancy/views//layouts/column1.p…", array("content" => "<!–SEPERATOR–> <div class="separator"> <div class="slide-p…", "leftcol" => "", "rightcol" => ""), true)
#21
/home/theinjsl/public_html/protected/components/Controller.php(219): CBaseController->renderFile("/home/theinjsl/public_html/themes/fancy/views//layouts/column1.p…", array("content" => "<!–SEPERATOR–> <div class="separator"> <div class="slide-p…", "leftcol" => "", "rightcol" => ""), true)
#22
/home/theinjsl/public_html/protected/controllers/SiteController.php(70): Controller->render("index")
#23
/home/theinjsl/public_html/testinfo/framework/web/actions/CInlineAction.php(49): SiteController->actionIndex()
#24
/home/theinjsl/public_html/testinfo/framework/web/CController.php(308): CInlineAction->runWithParams(array())
#25
/home/theinjsl/public_html/testinfo/framework/web/CController.php(286): CController->runAction(CInlineAction)
#26
/home/theinjsl/public_html/testinfo/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#27
/home/theinjsl/public_html/testinfo/framework/web/CWebApplication.php(282): CController->run("")
#28
/home/theinjsl/public_html/testinfo/framework/web/CWebApplication.php(141): CWebApplication->runController("")
#29
/home/theinjsl/public_html/testinfo/framework/base/CApplication.php(169): CWebApplication->processRequest()
#30
/home/theinjsl/public_html/index.php(13): CApplication->run()