0

When I run the command

D:\STUDIES\xampp\htdocs\yii\trackstar\protected>yiic migrate create create_project_table

in cmd it says

'"php.exe"' is not recognized as an internal or external command, operable program or batch file" 

Any idea ?

Christoph
  • 47,569
  • 8
  • 87
  • 187
Rage
  • 191
  • 1
  • 3
  • 10
  • have you set Path variable? – Kalpit Sep 13 '13 at 08:46
  • Is it in your `PATH` ? [How to add php.exe to your `PATH`](http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath) – MDEV Sep 13 '13 at 08:46
  • possible duplicate of [‘php.exe’ is not recognized as an internal or external command, operable program or batch file](http://stackoverflow.com/questions/8464315/php-exe-is-not-recognized-as-an-internal-or-external-command-operable-program) – ax. Sep 13 '13 at 08:47
  • possible duplicate of [php.exe is not recognized:create webapp](http://stackoverflow.com/questions/11706800/php-exe-is-not-recognizedcreate-webapp) – Stu Sep 13 '13 at 08:49
  • yes, i have already set the PATH as "D:\STUDIES\xampp\php\php.exe" – Rage Sep 13 '13 at 08:51
  • 3
    remove last "php.exe"... see my answer below... – Kalpit Sep 13 '13 at 08:52
  • Thank you so much. Removing the last "php.exe" in the path worked. I understood, we just need to give the path :) – Rage Sep 13 '13 at 08:57
  • cheers dude... enjoy with Yii – Kalpit Sep 13 '13 at 08:58

2 Answers2

3

set environment variable path like follow....

path :=>...;D:\STUDIES\xampp\php;D:\STUDIES\xampp\yii\yiiframework;

or set proper path (based on your dir structure) like above....

Kalpit
  • 4,906
  • 4
  • 25
  • 43
0

You also might need to add ".PHP" to your PATHEXT environment variable. See http://php.net/manual/en/install.windows.commandline.php