Problem: Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist This is because your tables names are in lowercase but in code they are being referred with different capitalization, Linux is case sensitive so it treats authassignment and AuthAssignment differently. In your root/protected/config/main.php specify exactly the same table names as they appear in your database.
If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error.Cause of the problem:
Solution:
'components'=>array( 'authManager'=>array( 'defaultRoles'=>array('guest'), 'class'=>'RDbAuthManager', 'assignmentTable'=>'authassignment', 'itemTable'=>'authitem', 'rightsTable'=>'rights', 'itemChildTable'=>'authitemchild', ),
Table 'DATEBASE_NAME.AuthAssignment' doesn't exist
<p>If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error.</p>
Related posts
Yii
Remove index.php from URL in YII
Learn how to configure Yii's UrlManager and Apache .htaccess rules to create clean, user-friendly URLs. This guide covers URL configuration, rewrite rules, common issues, and practical tips for improving Yii application routing
Yii
Yii Rights: Get all assigned roles of a user
Learn how to retrieve user roles in Yii Framework using the authassignment table, CDbCommand, and queryAll(). This guide explains how to fetch and store user roles, use parameter binding for safer SQL queries, leverage Yii’s built-in authorization manager, and implement role-based access control in PHP applications.
Yii
Disabled Yii logs and stack trace messages
Open up the index.php from root folder and comment out following 2 lines [code language=”php”] defined(‘YII_DEBUG’) or define(‘YII