/home/a1hoangh/public_html/yii/framework/db/ar/CActiveRecord.php(2144)

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

02132:    private $_validators;

02133:

02134:    /**

02135:      * Constructor.

02136:      * @param CActiveRecord the model instance

02137:      */

02138:    public function __construct($model)

02139:    {

02140:        $this->_model=$model;

02141:

02142:        $tableName=$model->tableName();

02143:        if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)

02144: throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',

02145:                array('{class}'=>get_class($model),'{table}'=>$tableName)));

02146:        if($table->primaryKey===null)

02147:            $table->primaryKey=$model->primaryKey();

02148:        $this->tableSchema=$table;

02149:        $this->columns=$table->columns;

02150:

02151:        foreach($table->columns as $name=>$column)

02152:        {

02153:            if(!$column->isPrimaryKey && $column->defaultValue!==null)

02154:                $this->attributeDefaults[$name]=$column->defaultValue;

02155:        }

02156:

Stack Trace

#0 /home/a1hoangh/public_html/yii/framework/db/ar/CActiveRecord.php(644): CActiveRecordMetaData->__construct(Object(Post))

#1 /home/a1hoangh/public_html/blog/protected/models/Post.php(15): CActiveRecord::model('Post')

#2 /home/a1hoangh/public_html/blog/protected/controllers/PostController.php(171): Post::model()

#3 /home/a1hoangh/public_html/yii/framework/web/actions/CInlineAction.php(32): PostController->actionList()

#4 /home/a1hoangh/public_html/yii/framework/web/CController.php(273): CInlineAction->run()

#5 /home/a1hoangh/public_html/yii/framework/web/filters/CFilterChain.php(129): CController->runAction(Object(CInlineAction))

#6 /home/a1hoangh/public_html/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()

#7 /home/a1hoangh/public_html/yii/framework/web/CController.php(922): CFilter->filter(Object(CFilterChain))

#8 /home/a1hoangh/public_html/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(Object(CFilterChain))

#9 /home/a1hoangh/public_html/yii/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter(Object(CFilterChain))

#10 /home/a1hoangh/public_html/yii/framework/web/CController.php(256): CFilterChain->run()

#11 /home/a1hoangh/public_html/yii/framework/web/CController.php(230): CController->runActionWithFilters(Object(CInlineAction), Array)

#12 /home/a1hoangh/public_html/yii/framework/web/CWebApplication.php(332): CController->run('')

#13 /home/a1hoangh/public_html/yii/framework/web/CWebApplication.php(120): CWebApplication->runController('')

#14 /home/a1hoangh/public_html/yii/framework/base/CApplication.php(133): CWebApplication->processRequest()

#15 /home/a1hoangh/public_html/blog/index.php(11): CApplication->run()

#16 {main}

========================================================

Please help me to solve this problem. My server info:

Operating system  Linux

Apache version  2.2.11 (Unix)

MySQL version  5.0.77-community

=========================================================

It worked fine on my localhost but when i upload to remote server error raised like that

Sorry guys, i solved that cause my database server had table name is post not Post  :cry: