Yii Web Application Creation

when i creating the yii web application

if i give root@ubuntu:/var/www# cd yii/framework/yiic webapp s

it will shows like that

bash: cd: yii/framework/yiic: Not a directory

what is the problem???

For this do one thing,

Copy entire framework folder and paste it inside your application.

Then open index.php file and change framework path to :


Hope it will solve your problem… :)

i saw the framework folder there is no yiic folder…just have the yiic.php file… is it the one creatinfg the problem???

There is no need for yiic folder.

There must be a file named as yiic.php in the framework folder.

Also check the path once again in the index.php file from your application that it is pointing to the framework folder at right position.

From your first post I see you gave this command [color=#1C2837][size=2]

cd yii/framework/yiic webapp s




[size=“2”][color="#1c2837"]You don’t need to “cd” you need to run the yiic script.[/color][/size]



[color=#1C2837][size=2]Check the guide here - [/size][/color][size="2"][color="#1c2837"]http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app[/color][/size]


Try this for creating a web application.

here i will show you some basic steps for create.

Hope u will understood.

Simply open your terminal window: and type Step-1: cd /var/www/yii/framework

press Enter

again type Step-2: php yiic webapp ../../myFirstApplication

Step-3 Press : Yes

after that you will get this message in terminal:Your application has been created successfully under /var/www/myFirstApplication.

Step-4 Open your folder myFirstApplication.then click on protected folder and then click on config folder and select main.php file.



Now remove the comment of gii and set the password as you want:


	// uncomment the following to enable the Gii tool





	 	// If removed, Gii defaults to localhost only. Edit carefully to taste.






remove database comment and write your database name, root,password and all…


		'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',


	// uncomment the following to use a MySQL database



		'connectionString' => 'mysql:host=localhost;dbname=janvi_db',

		'emulatePrepare' => true,

		'username' => 'root',

		'password' => 'ubuntu',

		'charset' => 'utf8',



open any browser and give path of your folder like : http://localhost/myFirstApplication/index.php?r=gii


enter your password which you have set in gii module in config/main.php file.


create first Model Generator. you will see that all your datatbase tables will display in that model name.now copy that model class value and click on Preview Button And Then Click on Generate button.


Create Crud Generator same as above

now u will see in broweser u will see your web application.

Hope this will help you to create new application.

if any query ,u can share with …