Yii Framework Forum: Chapter 2 - invoking yiic shell - Yii Framework Forum

Jump to content

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

Chapter 2 - invoking yiic shell cannot invoke in Mac using MAMP and Terminal

#1 User is offline   newtonpage 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 02-March 12

Posted 02 March 2012 - 06:12 AM

I am a newbie to Yii and love it so far. I am a veteran PHP developer with an MVC background, so this whole framework is great for me.

I am working thru the various examples. Successfully created the "demo" web app BUT when trying to do the simple "Hello Word" example, I have tried to invoke the yiic shell both from my Yii root and from the demo web directory but only get a PHP script.

YiiRoot/framework/yiic shell


I have tried (from the demo directory):

 protected/yiic shell


I have followed instructions both in the book and on this forum.

When I do this from the demo directory:

protected/yiic


I get:

Yii command runner (based on Yii v1.1.10)
Usage: protected/yiic <command-name> [parameters...]

The following commands are available:
 - message
 - migrate
 - shell
 - webapp

To see individual command help, use the following:
   protected/yiic help <command-name>



Since this seems right, I try:

protected/yiic shell


Same result.

Ideas?

Thanks so much for any help

S
0

#2 User is offline   newtonpage 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 02-March 12

Posted 02 March 2012 - 09:18 AM

I just discovered the following which seems to solve the problem. I suspect that it is related to Terminal and Bash.

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


This seems to have done the trick
0

#3 User is offline   Jesús_alejo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 25-July 13

Posted 16 November 2013 - 10:54 PM

Hola, esto se realiza navegando hasta la carpeta de la aplicación donde esta el script de entrada <<index.php>> y luego se ejecuta <<./protected/yiic shell>> y se podrá acceder a la shell.

Hi, this is done by navigating to the application folder where is the entry script <<index.php>> and then run <<./protected/yiic shell>> and the shell can access.
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