Yii Framework Forum: Database problems after switch to Linux - Yii Framework Forum

Jump to content

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

Database problems after switch to Linux Possibly a capitalization problem?

#1 User is offline   murphaph 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 06-May 11

Posted 14 August 2011 - 01:03 PM

Hello all,
I have worked through the book to the start of chapter 9 and I am in the process of shifting from a Windows environment to Linux (Mint 11). I have committed the project to SVN and checked it out. I made an export of the trackstar_dev database and have imported it to the Linux machine, apparently without problems. It's all there according to phpMyAdmin anyway.

I can start the application and login successfully, BUT when I attempt to view any project (even as the user who created it) I receive an exception:
CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'trackstar_dev.AuthAssignment' doesn't exist. The SQL statement executed was: SELECT * FROM AuthAssignment WHERE userid=:userid 


I am not sure if something funny is going on here, like Linux being strict with capitalization where Windows is slack. The database trackstar_dev most certainly exists (I wouldn't be able to log in if it didn't) and the table authassignment (note all lower case) exists too.

Please note, this setup is working fine under Windows so I sure it is either a capitalization issue or a permissions one. If anyone has any ideas on how I might proceed, I'm all ears! Thanks!
0

#2 User is offline   murphaph 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 06-May 11

Posted 14 August 2011 - 01:20 PM

I just tried to rename the database tables to what the app is expecting (capitalized) and it's working now. If anyone has any thoughts (thinks this is NOT the right way to go about fixing this issue) then let me know please!
0

#3 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,353
  • Joined: 12-October 09
  • Location:Croatia

Posted 14 August 2011 - 01:28 PM

Yes, the problem is in the proper capitalization... your fix is OK...
Find more about me.... btw. Do you know your WAN IP?
1

#4 User is offline   murphaph 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 06-May 11

Posted 15 August 2011 - 02:53 AM

Thanks for the input mdomba :)
0

#5 User is offline   julianm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 04-January 12

Posted 12 March 2012 - 11:16 AM

How about if I want to use lowercase names?
0

#6 User is offline   julianm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 04-January 12

Posted 12 March 2012 - 11:38 AM

Ok, I just used strtolower in the tableName method for each model.
0

#7 User is offline   Fixticks 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 31-May 11
  • Location:Uganda

Posted 11 April 2012 - 09:21 PM

add this
'assignmentTable'=>'authassignment'
, to config/main.php under authManager

'components'=>array(
		'user'=>array(
			...
		),
		
		'authManager'=>array(
			'class'=>'RDbAuthManager',
                        'assignmentTable'=>'authassignment',
                        'itemChildTable'=>'authitemchild',

A glass of water and 2 spoons of glucose makes the bugs go away
0

#8 User is offline   paulrud 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-December 13
  • Location:Sanok - Poland

Posted 27 January 2014 - 06:42 PM

Add this :
 'itemTable'=>'authitem', 


to config/main.php to the authManager componemt like this:
'authManager'=>array(
            'class'=>'CDbAuthManager',
            'connectionID'=>'db',
            'assignmentTable'=>'authassignment',
            'itemChildTable'=>'authitemchild',
            'itemTable'=>'authitem',
        ),

0

#9 Guest_Ann D. Guerrero_*

  • Group: Guests

Posted 03 February 2014 - 06:10 AM

Your fix is OK i think this is MYPHP admin problem.
Some time is happen some error due to update. Check updates if any update is available then update it.
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