Sunday 9 June 2013

Install Yii framework in Ubuntu, Linux or Windows (php)

  • Setup Yii framework php project How to install php application using yii framework on ubuntu Linux windows simple step to install php yii application How to setup yii framework php
First download Yii framework from the site http://www.yiiframework.com/download/

Just follow the steps.


  • Unzip the zip file of Yii framework in to your local server's root and rename the folder as your wish. Lets consider name folder as 'yii'.
e.g. 
  • If you are installing Yii on Ubuntu or any Linux platform then unzip the zip file of Yii under 'var/www/' directory.
  • If you are installing Yii on Window machine using xampp then unzip the zip file of Yii under 'c:\xmapp\htdocs\' (considering xampp installation directory as 'c:\xampp')

  • For windows user, set path of php.exe environment variable. For that open 'Control Panel\System and Security\System' and click on 'Advanced system settings' then click on 'Environment variables' then under 'System variables' label find 'Path' variable, select it and click on edit button and set path of php.exe at then end after symbol ';'(e.g. If you are using xampp, then path is 'c:\xampp\php\php.exe;').

  • Now go to path where your framework directory is located like.
For Ubuntu or Linux users
Open terminal and type
cd /var/www/yii

For Windows users
Open command prompt and type
C:\>cd xampp\htdocs\yii

  • Now create new folder in your local server's root. Lets consider name folder as 'application_name'.

  • Run command to create application based on yii.
For ubuntu or Linux users:
yiic webapp /var/www/application_name

For windows users
yiic webapp C:\xampp\htdocs\application_name

  • Press enter after doing above things and it will ask for following
Create a Web application under '/var/www/application_name’? [Yes|No] y
or
Create a Web application under ‘E:\xampp\htdocs\application_name’? [Yes|No] y

  • Press Enter and all the necessary files will be created under
/var/www/application_name
or
C:\xampp\htdocs\application_name

  • At last you will get message
Your application has been created successfully.

  • URL to access this application is http://localhost/application_name/


If you have any problem, ask freely...!!!