CDbException

Таблица "r9_users", упомянутая в записи active record класса "Users", не найдена в базе данных.

/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(2390)

2378 
2379     /**
2380      * Constructor.
2381      * @param CActiveRecord $model the model instance
2382      * @throws CDbException if specified table for active record class cannot be found in the database
2383      */
2384     public function __construct($model)
2385     {
2386         $this->_modelClassName=get_class($model);
2387 
2388         $tableName=$model->tableName();
2389         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2390             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2391                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2392                 
2393         if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null)
2394         {
2395             $table->primaryKey=$modelPk;
2396             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2397                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2398             elseif(is_array($table->primaryKey))
2399             {
2400                 foreach($table->primaryKey as $name)
2401                 {
2402                     if(isset($table->columns[$name]))

Stack Trace

#3
+
 /home/u170662/sparkkingru/www/protected/components/BaseController.php(15): CActiveRecord->findByPk(null)
10         parent::init();
11 
12         $session = new CHttpSession;
13         $session->open();
14 
15         $User = Users::model()->findByPk(Yii::app()->user->id);
16         if ($User === null) {
17             if (!isset($session['userHash']) || $session['userHash'] === "") {
18                 $session['userHash'] = md5(time() . mt_rand(1, 999));
19             }
20         }
#7
+
 /home/u170662/sparkkingru/www/protected/behaviors/WebApplicationEndBehavior.php(23): CApplication->run()
18         
19         // обрабатываем событие создания модуля
20         $this->onModuleCreate = array($this, 'changeModulePaths');
21         $this->onModuleCreate(new CEvent ($this->owner));
22         
23         $this->owner->run();        
24     }
25     
26     // обработчик события onModuleCreate
27     public function onModuleCreate($event)
28     {
#10
+
 /home/u170662/sparkkingru/www/index.php(16): CComponent->__call("runEnd", array("frontend"))
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
12 //test
13 require_once(dirname(__FILE__).'/vendor/autoload.php');
14 require_once($yii);
15 
16 Application::createWebApplication($config)->runEnd('frontend');
2024-03-19 14:14:33 Apache/2.4.46 Yii Framework/1.1.18