Yii 1.1: Starting with YII 1.1.x in Windows Environment (WAMP)

5 followers

As we know YII is the Leading Framework of PHP. Lots of new developers are starting to use YII day by day. Most of the beginners are little bit confused with how to start with YII . I think this note will help them. Follow the simple steps To run a Yii-powered Web application, you need a Web server that supports PHP 5.1.0.

Download

Download the YII framework from yiiframework.com. Link http://www.yiiframework.com/download/

Download zip file . Extract to /wamp/www folder and Rename it to yii. After installing Yii, you may want to verify that your server satisfies Yii's requirements. You can do so by accessing the requirement checker script via the following URL in a Web browser:

http://hostname/path/to/yii/requirements/index.php

Set Environment Variables

For Creating YII Application using yii webapp command from the command prompt , we need to set the paths of php and yii at Window Environment Variables .

  • Register the path were your php.exe reside at Window Environment Variables (e.g C:\Wamp2.4\bin\php\php5.4.16;)

  • Register the path were your yiic reside at Window Environment Variables (e.g C:\wamp\www\yii\framework; )

To set Environment Variables Right click MyComputer > Properties > Advanced System settings > Environment Variables > select Path > Edit >

Example C:\wamp\www\yii\framework; C:\wamp\bin\php\php5.4.16** ;

** Your php path

Save the paths. Now we can create yii application from command prompt using yiic webapp command.

Create Application

For yii application from command prompt using yiic webapp command In command prompt goto C:\wamp\www ( Where the application want to create ) . Execute command yiic , Now you can see the options message ,migrate, shell, webapp , webapp is used to create new yii application . So execute command

yiic webapp Application-name

Example

yiic webapp yiitest

Select yes , Your application is created as C:\wamp\www\test .
The basic application is ready you can see it by following URL in a Web browser:

http://hostname/ Application-name

Example

http://localhost/yiitest

Thats it. Yes It Is .

Some Use Full Links

Some Use Full Links for setting up the application

http://www.yiiframework.com/wiki/423/installing-yii-users-and-rights-to-newly-created-yii-app/

http://www.yiiframework.com/doc/guide/1.1/en/quickstart.installation

http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app

http://www.yiiframework.com/tour/

Be the first person to leave a comment

Please to leave your comment.

Write new article
  • Written by: Rajith R
  • Category: Tutorials
  • Yii Version: 1.1
  • Votes: +8
  • Viewed: 3,808 times
  • Created on: Jul 7, 2014
  • Last updated: Jul 7, 2014
  • Tags: newbie, yii, yiic