Moving website from localhost to hosting problems

I’m trying to move my website from localhost to a hosting. Everything seems to be setup, database is imported and connection in config/main.php is set correctly. But I get errors like:




Internal Server Error


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



Application log shows:




system.db.CDbCommand    |    Error in querying SQL: SHOW COLUMNS FROM `zCharacter`

exception.CDbException  |   


exception 'CDbException' with message 'The table "zCharacter" for active

record class "zCharacter" cannot be found in the database.' in

/home/equ/website.com/yii/framework/db/ar/CActiveRecord.php:1921

Stack trace:

#0 /home/equ/website.com/yii/framework/db/ar/CActiveRecord.php(328):

CActiveRecordMetaData->__construct(Object(zCharacter))

#1 /home/equ/website.com/docs/protected/models/zCharacter.php(18):

CActiveRecord::model('zCharacter')

#2

/home/equ/website.com/docs/protected/controllers/SearchController.php(36):

zCharacter::model()

#3 /home/equ/website.com/yii/framework/web/actions/CInlineAction.php(32):

SearchController->actionResults()

#4 /home/equ/website.com/yii/framework/web/CController.php(300):

CInlineAction->run()

#5 /home/equ/website.com/yii/framework/web/CController.php(278):

CController->runAction(Object(CInlineAction))

#6 /home/equ/website.com/yii/framework/web/CController.php(257):

CController->runActionWithFilters(Object(CInlineAction), Array)

#7 /home/equ/website.com/yii/framework/web/CWebApplication.php(320):

CController->run('results')

#8 /home/equ/website.com/yii/framework/web/CWebApplication.php(120):

CWebApplication->runController('search/results')

#9 /home/equ/website.com/yii/framework/base/CApplication.php(135):

CWebApplication->processRequest()

#10 /home/equ/website.com/docs/index.php(12): CApplication->run()

#11 {main} REQUEST_URI=/search/results?cn=%E5%99%A2%E4%BB%AC



Main page, contacts page and login page work fine. The database structure is exactly the same, the files are also the same.

What are some possible reasons of such behavior?

I’d really appreciate any suggestions.

Seems like I have a problem like here. I’ve tried to create a new model and got the same error (Warning: include(PDO.php): failed to open stream: No such file or directory). I checked my php cli modules and it doesn’t have pdo_mysql installed. Is there any way to work without pdo_mysql in php cli, because I actually have all neccessary modules installed in regular php (not php cli though)?

Check if the database server on your hosting is case sensitive. If this is the case, the tableName method of your model should return exactly the name of the table in your database.

Cool, I changed the table names in the database and it worked with some errors. Found the rest of the errors in controller names (case sensitivity stuff). Now everything is up and running.

davi_alexandre, thank you very much!