Difficulty In Setting Up Yii

Hello, i have loved Cakephp, and eventually i wanted to try a new framework. So, today i downloaded Yii 1.1.15, and was tring the Larry Ullman’s guide.

I can’t really get to run the yiic.

I went into the framework folder, and tried yiic and /.yiic but it wouldn’t run. Tried doing it on git bash and the windows cmd. I am using the Apache server(wamp).

…just removed wamp and installed xampp - no luck yet. The error now that i get is "/usr/bin/env: php: No such file or directory".

Also i’ve changed the php path in the yiic.bat file to where php exists in xampp

I’m able to run the demo projects, and i love them, but cannot start with the actual Yii setup. I’m pretty sure i am missing something… any help with be appreciated. Cheers!

Phew, okay guys. After a whole day of banging my head on it, and searching a lot of places. It seems i had multiple problems, starting from my wamp server to incorrect php path.

For someone who is new like me and is struggling, you may do this ->

1.) Download the latest version of Yii

2.) extract the Zip file (it’s name was yii-mater, if i remember correct)

3.) Copy the entire folder into - c:\wamp (for wamp users)… or c:/xampp/htdocs (for xampp users)

4.) Now, go inside your yii-master/framework and look for a file called "yiic.bat". Open it and you will find "if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe"

5.) Change this line to where php.exe is installed in your system. In wamp, you might find the path in c:\wamp\bin\php … and in xamp, you will find it in “C:\xampp\php”. Basically you’re looking for the php.exe file.

5.) Copy the path to your php.exe file into the yiic.bat file, so now it will look like "if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\xampp\php\php.exe"

6.) Now, open cmd (i don’t really know why this does not work in my Git Bash). Go into “yii-master/framework” directory, and now if you type “yiic webapp c:\xampp\htdocs\test”… this will create your Yii application!

(P.s - this line "yiic webapp c:\xampp\htdocs\test" basically tells the system to create a webapp into the next typed path).

I hope this helps someone who is struggling to install Yii. OK then, after a whole day of searching such a pesky little thing, i’m off to get a beer! Cheers!