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!