To setup Yii Web application in your local server (Xammp / Wamp /Easy PHP etc) on your Windows PC / Desktop /Server , here are steps:
Step 1 : EDIT PATH VARIABLE
First Got to Desktop right click on My Computer icon -> Properties
Now go for “Environment Variables”. Now go for “System Variables” , and find “Path” variable. Now Edit that and add the following line at the end of the existing line:
(N.B. : – I have installed Xammp on E : , if you have installed it elsewhere , please change the path respectively)
Please check the attach image for more.
N.B. Please reboot the system for get better result.
Step 2: Edit Yii Batch File
Now go to your yii folder , which you have download Yii Framework in your web root folder. Then go framework folder and open the “yiic.bat” in Note Pad or any other Text Editor.
Â And set the path of “php.exe” here :
Now, you have completed the set up ,and you are ready to kick off for your first Yii Web Application.
Open Command Prompt and go to your web root folder :
For mine , it’s E drive. Then enter into yii folder and type the following command to create your first project “helloyii”
E:\xampp\htdocs\yii>yiic webapp helloyii
That’s it , have a enjoy Yii .