Page 1 of 1
yiic shell works with main.php but not with index.php
#1
Posted 10 February 2010 - 09:55 PM
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
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
#2
Posted 11 February 2010 - 12:49 AM
Did you try "protected/yiic shell" from the main directory of your application?
#3
Posted 11 February 2010 - 12:54 AM
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
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
#4
Posted 11 February 2010 - 02:20 AM
andy_s, on 11 February 2010 - 12:49 AM, said:
Did you try "protected/yiic shell" from the main directory of your application?
Arvind, on 11 February 2010 - 12:54 AM, said:
yes, i tried both
protected/yiic shell index.php
protected/yiic shell index.php
What andy_s tryed to ask you is if you have tried "protected/yiic shell" - without index.php!
Find more about me.... btw. Do you know your WAN IP?
#5
Posted 11 February 2010 - 02:29 AM
ok.. i tried
protectec/yiic shell
and same result as before. nothing happens. no error message and i return back to the prompt.
protectec/yiic shell
and same result as before. nothing happens. no error message and i return back to the prompt.
#6
Posted 11 February 2010 - 03:00 AM
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.
#7
Posted 11 February 2010 - 03:10 AM
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
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
#8
Posted 11 February 2010 - 09:13 AM
Mike, on 11 February 2010 - 03:00 AM, said:
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.
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
Check out myYii powered website
Share this topic:
Page 1 of 1

Help
















