Yii Framework Forum: Windows user - need help - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Windows user - need help don't understand the command-line instructions

#1 User is offline   David Crisler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 05-April 11

Posted 05 April 2011 - 07:19 PM

Hi, I'm new to frameworks and wanted to learn so I bought the book. I'm on page 20 and already stuck! I cannot get the webapp command to work. The book seems to be using a Mac Terminal with Linux commands and I am on a PC using Windows Vista. How can I translate the commands to my operating system? And are these command-line instructions populated throughout the book? I'm screwed if that's the case..
0

#2 User is offline   Coda 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 20-September 10
  • Location:Kathmandu, Nepal

Posted 05 April 2011 - 10:55 PM

Hello David,
You can follow as :
E:\xampp\php>php.exe E:/xampp/htdocs/yii/framework/yiic webapp E:/xampp/htdocs/blog

where, E: is my drive location where I have installed xampp and blog is the web-application that I am creating.
0

#3 User is offline   David Crisler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 05-April 11

Posted 06 April 2011 - 07:45 PM

Thanks for that. How did you get through the rest of the book when all the shell commands are given in the Mac Terminal for a Linux operating system?

Why didn't the author include Windows commands in addition to the Linux commands? It wouldn't have been that hard to do or add many more pages to the book! It's frustrating...
0

#4 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,317
  • Joined: 12-October 09
  • Location:Croatia

Posted 07 April 2011 - 01:58 AM

All the commands are relative to the current directory... so I don't see a problem here... you just need to have some experience with the command line in windows...

first thing you need to do is to put in the PATH the folder where your PHP.EXE is... so that you can run php from any folder without typing the full path... (don't ask how ;) )

After that you need to understand what is a document root of your web server - if you don't understand this than you cannot really understand any command

Once you are in a webroot all the commands are relative to it... regardless if in the book is written % or some path like "C:\web\www" (just an example)
Find more about me.... btw. Do you know your WAN IP?
0

#5 User is offline   David Crisler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 05-April 11

Posted 07 April 2011 - 12:06 PM

mdomba - why did you say "don't ask how" about the php path?
0

#6 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,317
  • Joined: 12-October 09
  • Location:Croatia

Posted 07 April 2011 - 02:07 PM

Because IMO it's something you really need to know and understand if you think about using the command prompt...
Find more about me.... btw. Do you know your WAN IP?
0

#7 User is offline   David Crisler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 05-April 11

Posted 07 April 2011 - 03:24 PM

Well in case anyone else comes to these forums looking for actual help - like me - they will find the following info useful for understanding how to set the PATH variable in Windows:

If using XAMPP in Windows Vista, do this:

Open the Environment Variables window by going to: Start -> Computer (right click) -> Properties -> Advanced System Settings (in the left sidebar) -> Click the "Advanced" tab in the window that pops up -> Click on "Environment Variables" -> In the "System variables" dialog box scroll down until you see "path" -> highlight it and click "Edit" -> In the "Variable Value" field go all the way to the very end and add a semi-colon, then add the full path to the folder that houses your php.exe file C:/xampp/php -> Add another semi-colon and then add the full path to yii's "framework" folder. For me, that was C:/xampp/htdocs/yii/framework -> You do not need a semi-colon after the final entry.

What does this do? It enables you go to your webroot directory and simply type

yiic webapp foldername

..instead of including full paths like Coda's example above. So one can use either method - the long way of typing out paths, or the short method after configuring your Windows PATH variable as explained above.

This information is customized for the XAMPP environment. If you are using WAMP, these instructions are for you:

http://www.yiiframework.com/wiki/3/

(although the method for getting to the "Environment Variables" window is vague and wrong for Vista. Use my instruction above instead.)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users