开发者

bash command not found, or other workaround?

I'm working with the book Agile Web Development with Yii. In Chapter 8, it creates a php script to set up a RBAC (role based access control) so that when we access the shell at

/framework/yiic shell

it should allow us to enter a command

rbac

Pursuant to the PHP script that we created, the command creates three roles, Owner, Member and Reader with various permissions.

My problem is that, working with MAMP, when I do the command

yiic shell

it says

-bash: yiic: command not found

Therefore, I can't create these roles, and then I can't continue along with the book, because I don't know any work around

Can anyone help?

UPDATE pursuant to one of the answers below, I did chmod +x yiic

Now when I run /framework/yiic shell it seems to enter the shell but not the same one described by my book

The book tells me I should get this

    % YiiRoot/framework/yiic s开发者_Python百科hell Yii Interactive Tool v1.1 (based on Yii v1.1.2) Please type 'help' for help. Type 'exit' to quit. >>
    Now type help to see a list of available commands:
 >> help
    At the prompt, you may enter a PHP statement or one of the following commands:
    - controller
 - crud 
- form
 - help

    - model
 - module 
- rbac
    Type 'help <command-name>' for details about a command.

However, I'm getting

USAGE
  yiic shell [entry-script | config-file]

DESCRIPTION
  This command allows you to interact with a Web application
  on the command line. It also provides tools to automatically
  generate new controllers, views and data models.

  It is recommended that you execute this command under
  the directory that contains the entry script file of
  the Web application.

PARAMETERS
 * entry-script | config-file: optional, the path to
   the entry script file or the configuration file for
   the Web application. If not given, it is assumed to be
   the 'index.php' file under the current directory.


Try the full path:

/framework/yiic shell

You have to add /framework/ to your $PATH-environment variable if you want to use yiic without giving the full path.


You might need to specify the path:

/framework/yiic 

or include the directory in your PATH

PATH="$PATH:/framework"
export PATH
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜