Creating Yii application for the first time

Hie i’m new to the frame work and am trying to create my first application basing on the tutorial getting started but when i tried to run C:\>wamp\yii\framework\yiic webapp www\testdrive on the command prompt,am gettin the following error: “php.exe” is not recognized as an internal or external command,operable program or batch file.

Please can anyone assist me

you need to add to your PATH the php executable. On Windows it is at the environmental variables:

i added the php executable path to the environmemnt variables and tried to run create my first app again on the command prompt…

this is what i gt from the command prompt

C:\>wamp\www\yii\framework\yiic webapp www\testdrive

Error: The directory ‘www\testdrive’ is not valid. Please make sure the parent d

irectory exists.


yiic webapp <app-path>


This command generates an Yii Web Application at the specified location.


  • app-path: required, the directory where the new application will be created.

    If the directory does not exist, it will be created. After the application

    is created, please make sure the directory can be accessed by Web users.

enter this to a command prompt :

php c:\wamp\www\yii\framework\yiic webapp c:\wamp\www\testdrive

thanx man,it worked so when ever i want to create a new yii application,i’ll do the same procedure??

Almost. You will need to change c:\wamp\www\testdrive bit to the folder where you want to create your application.

i use

path %path%;C:\wamp\bin\php\php5.3.0

C:\wamp\www>C:\wamp\www\yii\framework\yiic webapp demo