Yii Framework Forum: Problems Creating First Yii Application - Yii Framework Forum

Jump to content

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

Problems Creating First Yii Application Rate Topic: -----

#1 User is offline   bamby 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-February 09

Posted 05 February 2009 - 08:22 AM

I am using Yii for the first time today. I am currently on 1.3 Creating First Yii Application. This is my yii directory  - C:\wamp\www\YiiRoot, my web root folder - C:\wamp\www and I am using WAMP.

I did cmd from run and typed - "C:\wamp\www\YiiRoot\framework>yiic webapp www\testdrive" and get the error msg -"'php.exe' is not recognized as an internal or external command,
operable program or batch file."


Could somebody please guide me on step by step on how to carry out this instruction - "% YiiRoot/framework/yiic webapp WebRoot/testdrive".
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 05 February 2009 - 09:56 AM

Please check this post:
http://www.yiiframew...opic,261.0.html
0

#3 User is offline   sayan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 13-January 09

Posted 05 February 2009 - 10:22 AM

You need to edit %PATH% environment variable to locate php.exe file.

If you are using Windows XP:

start -> My computer(right click!) -> Advanced Tab -> Environment Variables -> Click Path in System variables -> Edit -> Add you path to your wamp(or xampp) php folder(e.g. ;C:\xampp\php) -> OK

;)



0

#4 User is offline   bamby 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-February 09

Posted 05 February 2009 - 11:44 AM

I had the same issue, but now solved after much rumaging through the forum and several links. I think the issue is fundermental and it should be included in the first application setup chapter of the documentation. Thank you.

Should in case somebody else has the issue, added to the explanation giving here

check this out: http://www.rasyid.ne...th-for-php-cli/

and when ur back to yii, on the commandline, u'll type something like this,


C:\wamp\www\YiiRoot\framework>yiic webapp C:\wamp\www\testdrive

u'll get a prompt:

Create a Web application under 'C:\wamp\www\testdrive'? [Yes|No]

Type y, u'l be good.


Thanks all
0

#5 User is offline   krillzip 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 14-January 09
  • Location:Sweden

Posted 05 February 2009 - 05:35 PM

Hi y'all

I wrote an article on this topic on my blog: http://translate.goo...tml&sl=sv&tl=en

I did also write on how to do this in the cookbook. :)
http://www.yiiframew...doc/cookbook/3/
0

#6 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 05 February 2009 - 07:22 PM

Cool! Thank you!
0

#7 User is offline   min2511 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-March 09

Posted 22 March 2009 - 01:17 PM

Hi,

I am using Xampp and i have the same problem with my first YII application. Is there anyone online who can walk me through this?

Thanks
M
0

#8 User is offline   Mike_A 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 03-April 09

Posted 03 April 2009 - 04:06 PM

Qiang and others - brilliant effort! I've been around MVC for a while and developed my own but what you appear to have seems excellent.

I came to Yii from a March 2009 review which rates it tops in comparison to what are now regarded as industry standards. I am new to it though and have observed one or two difficulties which you must quickly overcome for newcomers.

One difficulty is installation with XAMPP on an XP machine. It varies from solutions I have seen posted here (and boringly had to hunt elsewhere for) so I've provided some feedback here.

1. Set WinXP paths.
Start/Settings/Control Panel/System/Advanced. Choose the "Environment Variables" tab at the bottom.
Setting the following in Notepad or other raw text editor will help rule out spelling mistakes...

"E:\xampp2\php;E:\xampp2\htdocs\your_website\framework".

The first path is a general path to the folder containing php.exe (or whatever name your php file has). The second to the Yii framework contained in the Yii installation batch. Revise it to suit your website name and folder (probably on C: drive, unlike mine which is E:).

If there's only one user only the "System Variables" pane will show. Select "Path from that pane then the Edit button. Copy form the text editor and paste it at the end of the "Variable Value" text string. If there's more than one user then do the same for each, this time entering "Path" in the "Variable Name" text entry field.

2. Restart machine.
Obvious though this may seem to seasoned pros, the new paths will not be set before system restart!

3. Test
In Start/Run type cmd (or Start/Programs/Accessories/Command Prompt). Follow the tutorial to test the new installation by making a dummy web application (http://www.yiiframew...doc/cookbook/3/) by entering "yiic webapp mywebsite", [where mywebsite] can be anything you want to name it for test purposes. It should ask if you want a new website to which, of course, enter "Y".

Now look at the Yii directory tree in Xampp/htdocs/{where you put the install} and you should see a new directory.

Of course, the directory path finally chosen for first test will vary but now play around with installation and other instructions.


Why go into a long and simplistic guide like this? Product branding, that's why.

Guys, you have a great product, kindly made available for others to share. I have little doubt it will become No1 O/S MVC and help a lot of people into the otherwise murky world of MVC architecture. So far as I have seen, it is clearly superior to RoR. To get there though, you need to make entry far more simple than I have seen (feedback, not criticism). People love playing with toys - if they can find where to put the batteries in! This toy took me too long to put the batteries in!

Ex-corporate boss, computer society chairman and now semi-retired, I may have a personal interest in providing assistance. I am introducing a major project to help others. I shall probably use Yii as the framework (that's after a more than year of testing other systems like RoR). I intend introducing the project to China in November 2009 (partner is Chinese and I have taught many Chinese postgrads). I see this product is known in China, where I hope to employ developers. So, if I can do something to make life easier, why not!  :)

Good luck, xiexie and apologies for the long post! Hope it helps some WinXP/Xampp developers.
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