yiic shell not working anymore

Hi everyone,

I just got started with Yii which is very helpful in many way, thanks for the great work :slight_smile:

Sadly we’re having an issue at the moment with yiic shell, it doesn’t prompt for anything anymore. It used to work, I generated my whole model, and now that I have updated my database, I would like to generate some model classes again.

When I tried to run yiic, it looks like it’s running, but finishes right away without prompting for anything…

From my webapp folder, I type :

./protected/yiic shell

And then I get my UNIX prompt again.

Any suggestion ? I tried on my Mac running MAMP, and on a Windows running XAMP, exact same behavior.

Thanks :slight_smile:

Have you configured access rules since the last time you used it? If index.php isn’t accessible without login anymore, the yiic tool will fail. You can circumvent that by specifying the path to the config file:

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

You got it right… I added an access restriction on index.php… I had no clue that could cause a problem yiic. It would be nice to get a comprehensive message there isn’t it ? :wink:

I’m a new Yii fan :slight_smile:

Also be aware that if you change the default layout, yiic may stop working.

An easy fix is to check if the app is running in command line mode by testing argv.

Thanx a lot!!!! Got same problem and (ahaha) same simple solution

I have the same problem. I have fresh Yii app. Where are the access rules defined?