CDbException

The table "{{settings_global}}" for active record class "SettingGlobal" cannot be found in the database.

/var/www/ds1134/https.www.buzzador.com/report3/framework/db/ar/CActiveRecord.php(2362)

2350 
2351     /**
2352      * Constructor.
2353      * @param CActiveRecord $model the model instance
2354      * @throws CDbException if specified table for active record class cannot be found in the database
2355      */
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();
2367             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2368                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2369             elseif(is_array($table->primaryKey))
2370             {
2371                 foreach($table->primaryKey as $name)
2372                 {
2373                     if(isset($table->columns[$name]))
2374                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#0
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct(SettingGlobal)
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     /**
#1
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/db/ar/CActiveRecord.php(677): CActiveRecord->getMetaData()
672      * @param string $name attribute name
673      * @return boolean whether this AR has the named attribute (table column).
674      */
675     public function hasAttribute($name)
676     {
677         return isset($this->getMetaData()->columns[$name]);
678     }
679 
680     /**
681      * Returns the named attribute value.
682      * If this is a new record and the attribute is not set before,
#2
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/models/LSActiveRecord.php(27): CActiveRecord->hasAttribute("created")
22      * @see CTimestampBehavior
23      * @see PluginEventBehavior
24      * @return array
25      */
26     public function behaviors(){
27         $sCreateFieldName=($this->hasAttribute('created')?'created':null);
28         $sUpdateFieldName=($this->hasAttribute('modified')?'modified':null);
29         $sDriverName = Yii::app()->db->getDriverName(); 
30         if ($sDriverName=='sqlsrv' || $sDriverName=='dblib')
31         {
32             $sTimestampExpression=new CDbExpression('GETDATE()');
#3
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/db/ar/CActiveRecord.php(396): LSActiveRecord->behaviors()
391         if(isset(self::$_models[$className]))
392             return self::$_models[$className];
393         else
394         {
395             $model=self::$_models[$className]=new $className(null);
396             $model->attachBehaviors($model->behaviors());
397             return $model;
398         }
399     }
400 
401     /**
#4
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/models/SettingGlobal.php(28): CActiveRecord::model("SettingGlobal")
23      * @param string $class
24      * @return CActiveRecord
25      */
26     public static function model($class = __CLASS__)
27     {
28         return parent::model($class);
29     }
30 
31     /**
32      * Returns the setting's table name to be used by the model
33      *
#5
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/helpers/globalsettings_helper.php(21): SettingGlobal::model()
16 injectglobalsettings();
17 
18 
19 function injectglobalsettings()
20 {
21     $settings = SettingGlobal::model()->findAll();
22 
23     //if ($dbvaluearray!==false)
24     if (count($settings) > 0)
25     {
26         //foreach  ($dbvaluearray as $setting)
#6
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/helpers/globalsettings_helper.php(16): injectglobalsettings()
11  * See COPYRIGHT.php for copyright notices and details.
12  *
13  */
14 //Ensure script is not run directly, avoid path disclosure
15 //if (!isset($homedir) || isset($_REQUEST['$homedir'])) {die("Cannot run this script directly");}
16 injectglobalsettings();
17 
18 
19 function injectglobalsettings()
20 {
21     $settings = SettingGlobal::model()->findAll();
#7
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/YiiBase.php(320): require("/var/www/ds1134/https.www.buzzador.com/report3/application/helpe...")
315             if($isClass)
316             {
317                 if($forceInclude)
318                 {
319                     if(is_file($path.'.php'))
320                         require($path.'.php');
321                     else
322                         throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias)));
323                     self::$_imports[$alias]=$className;
324                 }
325                 else
#8
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/core/LSYii_Application.php(182): YiiBase::import("application.helpers.globalsettings_helper", true)
177     * @param string $helper
178     * @return void
179     */
180     public function loadHelper($helper)
181     {
182         Yii::import('application.helpers.' . $helper . '_helper', true);
183     }
184 
185     /**
186     * Loads a library
187     *
#9
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/core/LSYii_Controller.php(69): LSYii_Application->loadHelper("globalsettings")
64      * @param string $helper
65      * @return void
66      */
67     public function loadHelper($helper)
68     {
69         Yii::app()->loadHelper($helper);
70     }
71 
72     /**
73      * Loads a library
74      *
#10
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/application/core/LSYii_Controller.php(37): LSYii_Controller->loadHelper("globalsettings")
32         parent::__construct($id, $module);
33         $this->_checkInstallation();
34 
35         Yii::app()->session->init();
36         $this->loadLibrary('LS.LS');
37         $this->loadHelper('globalsettings');
38         $this->loadHelper('common');
39         $this->loadHelper('expressions.em_manager');
40         $this->loadHelper('replacements');
41         $this->_init();
42     }
#11
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/web/CWebApplication.php(359): LSYii_Controller->__construct("surveys", null)
354                     require($classFile);
355                 if(class_exists($className,false) && is_subclass_of($className,'CController'))
356                 {
357                     $id[0]=strtolower($id[0]);
358                     return array(
359                         new $className($controllerID.$id,$owner===$this?null:$owner),
360                         $this->parseActionParams($route),
361                     );
362                 }
363                 return null;
364             }
#12
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/web/CWebApplication.php(276): CWebApplication->createController("")
271      * @param string $route the route of the current request. See {@link createController} for more details.
272      * @throws CHttpException if the controller could not be created.
273      */
274     public function runController($route)
275     {
276         if(($ca=$this->createController($route))!==null)
277         {
278             list($controller,$actionID)=$ca;
279             $oldController=$this->_controller;
280             $this->_controller=$controller;
281             $controller->init();
#13
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/framework/web/CWebApplication.php(141): CWebApplication->runController("")
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.
#14
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/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     /**
#15
+
–
 /var/www/ds1134/https.www.buzzador.com/report3/index.php(200): CApplication->run()
195         die (sprintf('%s should be writable by the webserver (755 or 775).', $runtimePath));
196     }
197 }
198 
199 
200 Yii::createApplication('LSYii_Application', $config)->run();
201 
202 /* End of file index.php */
203 /* Location: ./index.php */
2014-12-09 18:48:41 Apache/2.2.9 (Debian) PHP/5.3.3-7+squeeze22 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8o Yii Framework/1.1.15