Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.exe is not recognized:create webapp

Tags:

php

cmd

yii

I am toying with my new install of yii framework, and trying to compile my first webapp through the command line. when I run yiic webapp ../testdrive i receive this error in my console:

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

Do I need to edit my php.ini file?

I am currently running on WAMP Webserver on Windows 7

like image 861
robabby Avatar asked Jul 29 '12 04:07

robabby


2 Answers

You need to add complete path in your php.exe in `yii\framework\yiic.bat

for example in my case it is if

"%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.3.8\php.exe

like image 153
Afnan Bashir Avatar answered Oct 10 '22 04:10

Afnan Bashir


Simply use the path of the php.exe before the yiic to execute the php script in windows environment.

your command will look something like this:

c:/xampp/php/php.exe path/yiic webapp application_name

like image 41
Vishal Venugopal Avatar answered Oct 10 '22 06:10

Vishal Venugopal