system
(system)
June 9, 2009, 9:47am
1
Hi,
my system running Windows XP , Wamp server
in MS DOS mode I tried
E:\wamp\www\yii\framework\yiic webapp testdrive
the message shows by the Ms DOS is below
"
X-powered-By: PHP/5.2.9-2
Content-type: text/html
This script must be run from the command line.
"
I am in trouble please help me…
thanks!
rickgrana
(Ricardo Grana)
June 9, 2009, 12:30pm
2
Your shell should be on e:\wamp\www
So,
E:\wamp\www> yiic webapp testdrive
Make sure you have add yii path and php path to the system path.
system
(system)
June 9, 2009, 12:51pm
3
Hi rickgrana,
thanks for the reply!
yes I added yii path and php path to the system path like this
E:\wamp\www\yii\framework;E:\wamp\bin\php\php5.2.9-2
I tried
E:\wamp\www> yiic webapp testdrive
but it produces the same message
I am waiting your help on this…
thanks!
rickgrana
(Ricardo Grana)
June 9, 2009, 1:21pm
4
i think you are posting the bottom of the message.
Could you post the entire message?
system
(system)
June 9, 2009, 1:38pm
5
when run
E:\wamp\yiic webapp testdrive
or
E:\wamp\www\yii\framework\yiic webapp testdrive
the message shows by the Ms DOS is below
"X-powered-By: PHP/5.2.9-2
Content-type: text/html
This script must be run from the command line."
qiang
(Qiang Xue)
June 9, 2009, 2:55pm
6
It is because $_SERVER['argv'] is not defined. Normally this should be populated with the command line arguments. You should check your PHP installation.
system
(system)
June 9, 2009, 3:29pm
7
Can you please guide me what should I do to fix the issue. As I am stuck with this. I can not work on YII…
Thanks!
system
(system)
June 9, 2009, 3:34pm
8
I am using WampServer 2.0
system
(system)
June 9, 2009, 4:28pm
9
Actually I am unable to use YIIC and shell,
which I know are very very useful.
qiang
(Qiang Xue)
June 10, 2009, 3:18am
10
$_SERVER['argv'] normally should be populated with command line arguments. If not, it means your PHP installation has problem. You should seek help from WAMP forums, or try to reinstall your PHP.
rickgrana
(Ricardo Grana)
June 10, 2009, 12:15pm
11
I use WampServer 2.0 too, and no problem.
In the last case, reinstall it.