CDbException:CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]:...

I am using the latest yii framework yii-1.1.10.r3566.tar.gz

I did not have problems in my developing setup (windows 7, latest XAMPP 1.7.7)

but when I deployed my webapp to remote site ( I am using justhost linux env … )

I got errors

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘XXXX_mts.AuthAssignment’ doesn’t exist

I searched this issue from the web , there were similar issues in the previous yii too… can not get solution …

did I do anything wrong …!

does anyone have good solutions …? thx

I believe it is a bug …

-KBG

This is one of the most common error when changing from case insensitive OS like windows to a case sensitive OS like linux… check the case of your table it should be "AuthAssignment" - note the case.

thx…

I am looking into the function where I can use php’s strtolower function …to handle it …

anyone has any idea where should I added strtolower …

-kbg

try to set this property to all lowercase - http://www.yiiframework.com/doc/api/1.1/CDbAuthManager#assignmentTable-detail

you will probably need to do the same for

http://www.yiiframework.com/doc/api/1.1/CDbAuthManager#itemChildTable-detail

and

http://www.yiiframework.com/doc/api/1.1/CDbAuthManager#itemTable-detail

I run this SQL and it works just fine:


RENAME TABLE `authassignment` TO `AuthAssignment` ;

Thanks for this!

Sorted my errors out from ‘development using wamp on windows’ to going ‘live on a linux server’.

Used a a few capitalizations in rule components for table names.