[Beginner] Command prompt

Hello,

I’m totally new to YII and I’m reading the book now. The first thing I need to do is use yiic in the command prompt.

I’ve made a folder C:/Site/demo for my first demo. In that folder I’ve placed my YII software. Now when I go in the command prompt and type framework/yiic webapp demo when I’m in C:/site/demo it says it doesn’t recognize framework as a command. Can someone tell me what I do wrong?

Now I went to the framework directory in the cmd and started YIIC with yiic webapp c:\site\demo

It now says that it can’t find php.exe. Should I also install php at my laptop? And is the above syntax correct?

Wow…

First of all you need a HTTP server that it seems you don’t have…

Do you mean that I need to install WAMP to do this locally?

The problem is that I also need IIS, can I run this together on 1 laptop?

And when I do that. Is the above syntax then correct?

I haven’t tryed it on IIS… but if you have PHP there it should work… don’t forget to check the Yii requirements

You can install WAMP or any other ready-made solution for windows…

When you have all Yii requirements… then the best way to procede is to follow the Definitive Guide to Yii

Thanks for your help.

I’m using the definitive guid now instead of the book. The only thing I still don’t understand of is that if I’m creating a new website named test, I need to create a folder test in my c:/Wamp/WWW folder. Should I also put my YII software in my test folder? Or should I also create a folder C:/wamp/www/yii folder in which I put the YII software?

The definitive guide is the bare minimum you need to understand Yii… after the guide you can go with the book you will understand it better…

As for the yii framework… it’s all matter of taste… you can put it in the application folder ( c:\wamp\www\test\yii ) or in the web root folder (c:\wamp\www\yii )

First option is maybe better if you develop only one application and need to send it to someone, than you have all in one folder…

The second option is better as you can develop more applications all using the same yii folder…

I’m sorry, I feel like a complete newbie at the moment. I can’t seem to get it right.

When I create the folders like above with yii in in the test folder, how should my command line look?

So my site folder is: c:\wamp\www\test

And my yii folder is: c:\wamp\www\test\yii

When you unpack yii… you get 3 folders demos, framework and requirements… For your application you need only the framework folder so you can put it’s content in the c:\wamp\www\test\yii…

Then in the command prompt you go to c:\wamp\www and run as:


test\yii\yiic webapp test

When I do that the command prompt says that php.exe isn’t recognized. Buw I did install my WAMP and everything seems to be running. The requirements also say that it should work.

Windows cannot find the php.exe… you need to set the PATH correctly…

How have you done the command?

Just like mdomba suggested above.

How and where do I set my path to php.exe?

That’s really a windows newbie question… I just googled “windows set path” and here is the first link - http://www.computerhope.com/issues/ch000549.htm

It works! Thank you very much

I was like you just 2 months ago but now I can make some cool stuff quickly with yii… Thanks to all yii team