Anybody setup Yii Playground on their computer before? http://code.google.com/p/yiiplayground/downloads/list
Does it require special DB connection? Why they built a DB manager? Please tell me what you think. Thank you!
I exactly followed the install.txt, but got the following error:
it
PHP Error
Undefined index: r
C:\xampp\htdocs\yii_playground\protected\components\DbManager.php(11)
01 <?php
02 class DbManager extends CApplicationComponent{
03
04 public function init() {
05 parent::init();
06 // if we already have a connection, we quit
07 // this will allow user to set up a custom one
08 if (Yii::app()->db->active)
09 return;
10
11 if ($_GET['r'] == 'site/createUserDb')
12 return;
13
14 if ($this->dbExists()) {
15 Yii::app()->db->connectionString ='sqlite:'.Yii::app()->params['user_db'];
16 Yii::app()->db->setActive(true);
17 } else {
18 $this->resetUserDb();
19 }
20 }
21
22
23 protected function dbExists() {
Stack Trace
#0
+
–
C:\xampp\htdocs\yii\framework\base\CModule.php(372): DbManager->init()
367 if(!isset($config['enabled']) || $config['enabled'])
368 {
369 Yii::trace("Loading \"$id\" application component",'system.CModule');
370 unset($config['enabled']);
371 $component=Yii::createComponent($config);
372 $component->init();
373 return $this->_components[$id]=$component;
374 }
375 }
376 }
377
#1
+
–
C:\xampp\htdocs\yii\framework\base\CModule.php(477): CModule->getComponent("dbManager")
472 * Loads static application components.
473 */
474 protected function preloadComponents()
475 {
476 foreach($this->preload as $id)
477 $this->getComponent($id);
478 }
479
480 /**
481 * Preinitializes the module.
482 * This method is called at the beginning of the module constructor.
#2
+
–
C:\xampp\htdocs\yii\framework\base\CApplication.php(139): CModule->preloadComponents()
134 $this->initSystemHandlers();
135 $this->registerCoreComponents();
136
137 $this->configure($config);
138 $this->attachBehaviors($this->behaviors);
139 $this->preloadComponents();
140
141 $this->init();
142 }
143
144
#3
+
–
C:\xampp\htdocs\yii\framework\YiiBase.php(118): CApplication->__construct("C:\xampp\htdocs\yii_playground/protected/config/development.php")
113 * @return mixed the application instance
114 * @since 1.0.10
115 */
116 public static function createApplication($class,$config=null)
117 {
118 return new $class($config);
119 }
120
121 /**
122 * @return CApplication the application singleton, null if the singleton has not been created yet.
123 */
#4
+
–
C:\xampp\htdocs\yii\framework\YiiBase.php(91): YiiBase::createApplication("CWebApplication", "C:\xampp\htdocs\yii_playground/protected/config/development.php")
86 * which should point to the directory containing all application logic, template and data.
87 * If not, the directory will be defaulted to 'protected'.
88 */
89 public static function createWebApplication($config=null)
90 {
91 return self::createApplication('CWebApplication',$config);
92 }
93
94 /**
95 * Creates a console application instance.
96 * @param mixed $config application configuration.
#5
+
–
C:\xampp\htdocs\yii_playground\index.php(11): YiiBase::createWebApplication("C:\xampp\htdocs\yii_playground/protected/config/development.php")