Yii Framework Forum: Moving website from localhost to hosting problems - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Moving website from localhost to hosting problems Rate Topic: -----

#1 User is offline   Equ 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-November 09
  • Location:Russia, Moscow

Posted 21 December 2009 - 11:47 AM

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.
0

#2 User is offline   Equ 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-November 09
  • Location:Russia, Moscow

Posted 21 December 2009 - 01:09 PM

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)?
0

#3 User is offline   davi_alexandre 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 104
  • Joined: 08-July 09
  • Location:Guarulhos - São Paulo

Posted 21 December 2009 - 01:43 PM

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.
0

#4 User is offline   Equ 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-November 09
  • Location:Russia, Moscow

Posted 21 December 2009 - 05:56 PM

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!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users