CDbException

The table "user" for active record class "User" cannot be found in the database.

/home/zikbay/public_html/yii-1.1.7.r3135/framework/db/ar/CActiveRecord.php(2237)

2225     private $_model;
2226 
2227     /**
2228      * Constructor.
2229      * @param CActiveRecord $model the model instance
2230      */
2231     public function __construct($model)
2232     {
2233         $this->_model=$model;
2234 
2235         $tableName=$model->tableName();
2236         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2237             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2238                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2239         if($table->primaryKey===null)
2240             $table->primaryKey=$model->primaryKey();
2241         $this->tableSchema=$table;
2242         $this->columns=$table->columns;
2243 
2244         foreach($table->columns as $name=>$column)
2245         {
2246             if(!$column->isPrimaryKey && $column->defaultValue!==null)
2247                 $this->attributeDefaults[$name]=$column->defaultValue;
2248         }
2249 

Stack Trace

#3
+
 /home/zikbay/public_html/protected/controllers/SiteController.php(145): CActiveRecord->__construct("contact")
140     }
141     
142     public function actionContact()
143     {
144       $sendSuccessfully = FALSE;
145       $user = new User('contact');
146       if (Yii::app()->request->IsPostRequest)
147       {
148           $result = FSM::run('User.User.contact', $_POST);
149           if (! $result->hasErrors())
150               $sendSuccessfully = TRUE;
#11
+
 /home/zikbay/public_html/index.php(25): CApplication->run()
20     )
21 {
22     require_once(dirname(__FILE__).'/protected/modules/install/install.php');
23 }else{
24     require_once($yii);
25     Yii::createWebApplication($config)->run();
26 }
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/zikbay/public_html/yii-1.1.7.r3135/framework/views/exception.php on line 217 2021-04-21 12:10:42 Apache/2.4.39 (Unix) OpenSSL/1.0.2k-fips Yii Framework/1.1.7