I'm trying to build my first app in Yii, the guide on their website at the following address: http://www.yiiframework.com/doc/guide/1.1/he/quickstart.first-app # add-comment The problem is that any issue installing the application framework through the YIIC can not have that. I did the following: 1. I went through the CMD Library of the framework that is my WAMP server. 2. I wrote the following command: yiic.php webapp www/blog, I also tried the following command: yiic webapp www/blog.
As I understand their guide, should there be a directory called blog with a skeleton application. What actually happens is that windows opens me the window titled "Open With" asking me to choose which program I want to open the yiic.php to view the contents of the file.
1-Used command prompt/DOS and go to the cd c:\wamp\www\yii\framework. Here "yii" folder has the yii files.
2-Then type yiic webapp ../../yiimyapp. Here yiimyapp is my new folder in the www folder of wamp.
3-After that it will ask to confirm to create the app in the www folder. Type yes and enter.
4-App will be created. Go to the www folder and you can see newly created "yiimyapp" folder with files.
If you need to create the app inside the yii/demos folder just type yiic webapp ../demos/yiimyapp in the above step 2. Then app folder will create inside the yii demos folder. not as separate folder in the www root.
That's only.
This manual for installing
yii 2.0
from this link.It's always better to follow yii official documentation. You can find Installing Yii process step by step here
here is the link http://www.yiiframework.com/doc/blog/1.1/en/start.testdrive#installing-yii
If you getting this kind of error when you try to use yiic webapp ..\app-name
'"php.exe"' is not recognized as an internal or external command, operable program or batch file.
Open the yiic.bat file under yii framework folder ( C:\wamp\www\framework ) and change the bellow line
to
php5.4.16 this might be change accroding to you php version, please check in C:\wamp\bin\php folder before change
or else you can set this path variable as Environment Variable ( Control Panel\All Control Panel Items\System > advance system settings > Environment Variable ) what you have to do is add this C:\wamp\bin\php\php5.4.16\php.exe with ; after path value like bellow image
On windows you just go to your framework folder and type:
yiic will default to yiic.bat so you don't need to specify any php.exe (I'm not saying that it wouldn't work like that). and path to your new project can be relative or absolute, here are some examples:
To create on Windows i use:
or
To create on Linux:
The command for creating project is
in wich test is the project name.
For more details check this link
http://dcageek.blogspot.com/2013/06/how-to-install-yii-framework-on-windows.html
Also if you face the problem after adding the php engine path in environment variable by computer properties .directly you can add the yii.bat location by "C:\wamp\www\Yii\framework" The location I given as a example means my yii framework bat file located at C:\wamp\www\Yii\framework
Above can be done through by going to : Start -> My Computer (right click!) -> Advanced Tab -> Environment Variables -> Click Path in System variables -> Edit.
for more details How to Install Yii Application