arbir
(Arvind Rangan)
February 11, 2010, 2:55am
1
Hello,
I tried doing this in the main directory of my application where index.php resides.
$ path/to/yii/framework/yiic shell index.php
$
and it came back to prompt and the shell never opened.
but when i did this
$ path/to/yii/framework/yiic shell protected/config/main.php
Yii Interactive Tool v1.1 (based on Yii v1.1.0)
Please type ‘help’ for help. Type ‘exit’ to quit.
In general the application works fine without a flaw. and index.php is valid and its able to control the application nicely.
So, i dont quite get , it, why it worked with main.php but not with index.php.
I am using
php -v
PHP 5.3.1 with Suhosin-Patch (cli) (built: Feb 3 2010 22:58:35)
Copyright © 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2009 Zend Technologies
thanks
Arvind
andy_s
(Arekandrei)
February 11, 2010, 5:49am
2
Did you try "protected/yiic shell" from the main directory of your application?
arbir
(Arvind Rangan)
February 11, 2010, 5:54am
3
yes, i tried both
protected/yiic shell index.php
and
/path/to/yii/framework/yiic shell index.php
they just dont work.
it seems to like only main.php
There is no error message. just the cursor returns to prompt.
is there any log that i can check ?
nothing in /var/log/messages.
Arvind
mdomba
(Maurizio Domba Cerin)
February 11, 2010, 7:20am
4
What andy_s tryed to ask you is if you have tried "protected/yiic shell" - without index.php!
arbir
(Arvind Rangan)
February 11, 2010, 7:29am
5
ok… i tried
protectec/yiic shell
and same result as before. nothing happens. no error message and i return back to the prompt.
mikl
(Mike)
February 11, 2010, 8:00am
6
Have you configured access rules that prevent to access the start page without login? If so, there’s no other way to use the shell except providing the path to main.php.
arbir
(Arvind Rangan)
February 11, 2010, 8:10am
7
Hey Mike,
you hit the nail on the head.
yeah, my start page cannot be accessed unless you login.
so you when you try
http://localhost/myapp/
it will redirect you to
http://localhost/myapp/site/login
no wonder :-)… thanks… you solved a big problem for me.
thanks a ton
Arvind
Awesome!, I have been experiencing exactly the same behavior and until now it has totally baffled me. As a work around I created a bogus application referencing the same DB and created my models and crud and then just copied them into the appropriate places.
Thanks Mike, it’s great to know why it was broken.
doodle