YIIC webapp testdrive does not work.

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!

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.

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!

i think you are posting the bottom of the message.

Could you post the entire message?

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."

It is because $_SERVER['argv'] is not defined. Normally this should be populated with the command line arguments. You should check your PHP installation.

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!

I am using WampServer 2.0

Actually I am unable to use YIIC and shell,

which I know are very very useful.

$_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.

I use WampServer 2.0 too, and no problem.

In the last case, reinstall it.