problem running the rbac tool in chapter 8

I am working through the book and am trying to run the shell tool in chapter 8.

I have tried the various methods on this forum such as those listed here: http://www.yiiframework.com/forum/index.php?/topic/20060-please-help-chapter-8/

But all that happens when I run it is either the:


Error: index.php does not exist or is not an entry script file.

Error or the index.php is opened in the command line and displayed.

I am using the latest MAMP on OS X 10.7.2

Thanks

You have to specify the path to your main.php


 yiic shell /YourWebApp/protected/config/main.php

It is solved the cause is wrong command

<%root of your installed Yii folder %>yiic shell C:\xampp\htdocs\trackstar\protected\commands\shell\RbacCommand.php

instead of above command it should be :-

<%root of your installed Yii folder %>yiic shell C:\xampp\htdocs\trackstar\protected\config\main.php

After this command i got what are expected.

Is there a way to set the default configuration file for yiic shell commands to use?

Don’t know any way to do that, sorry.

I tried run the frst step, but it didn’t work.

www/YiiRoot/framework/yiic shell where YiiRoot is the folder that I uncompress the Yii Download file.

whats the correct way to run this command?