Gii vs Yii on Unix machines


I work recently on Linux machine, and I have problem with models file names. Im using Gii to create model files, and Gii creates Users.php for user db table. But Yii is searching for users.php file, whitch is not the same on unix machine and I got:

include(users.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

Is there any configuration to fix that issue? Or should I hack Gii so it creates down-cased filenames?

Unix OS is case- sensitive… windows is not… so you need to pay attention to how you write model names in your code…

For example if you write

$model=new user;

windows will use User.php… but unix/linux not… you need to pay attention on how you write model names in your code…

So yo uneed to write

$model=new User;

I do it like that in this:

$this->profileData['user'] = CActiveRecord::model('users')->find('login=:login',array(':login' => $_GET['login']));

File generated by Gii is "Users.php",

Classname of that file generated by Gii is

class Users extends CActiveRecord

… and Yii is looking for "users.php"… why not for "Users.php" ?

How do you guyz who work on unix create models?

It’s not Yii, it’s you. Your code is wrong. Linux is case-sensative

Try this: don’t ever work in Windows. Problm solved ;)

Finally I got what you meant…

this works:


Still learning… thank you guyz.