Weird Cdbexception

Hi,

I have created my first yii powered website on my computer locally. Then I put website online and it worked well. But I need to publish website another hosting.

I copied whole files to new hosting. I just changed database connection information (server, user name, pass). And I also created database using exported sql file of other online database.

Unluckly I got “The table … for active record class … cannot be found” exception. I know there is a table with that name. I checked database user privileges and all privileges granted for my mysql user. I give all permissions to all files also… But no way :(

What should I do? What can I try to solve this problem? Which settings do I need to check?

Kind Regards

Make sure the config/main.php file contains proper settings.

I tested with changing config/main.php when I entered it wrongly it doesn’t give that error. It gives error about database connection problem. When I set settings true I got the error above post :(

Thank you for your advice, I will work on it more.

try to put


'schemaCachingDuration'=>0

in your db component in config/main.php and try again.

luck

Oh I forgot about that. When I do some changes in the database schema I often just clear the protected/runtime/cache directory.