Hi, i'm new in Yii world... i'm following the yii guide.
In the point 1.3 Creating first yii application.
The step says
Run yiic on the command line as follows:
% YiiRoot/framework/yiic webapp WebRoot/testdrive
in my win console i execute the yiic.bat file and show this error message
"php.exe" is not recognized as an internal or external command, program or batch file executable.
i'm running EasyPHP for all my test sites.
Thanks for all...
PD: Sorry for the bad english!
Page 1 of 1
Error running yiic.bat in WinXp
#2
Posted 05 December 2008 - 11:59 AM
Hi Biktor,
I think the %PATH% environment variable should contain the folder where your PHP.exe file is located. To check, you can just open a win console en type php.exe ...

I think the %PATH% environment variable should contain the folder where your PHP.exe file is located. To check, you can just open a win console en type php.exe ...
#3
Posted 05 December 2008 - 02:31 PM
Oh!, thank you for your prompt response...
let me see, this is my file yiic.bat
I suppose that the %PATH% you tell me, in this case is called %PHP_COMMAND% i have to replace it with the path to my php.exe file.
my new file look like:
I execute te file again and ready!
Thank you very muchera una tontería.
let me see, this is my file yiic.bat
@echo off
rem -------------------------------------------------------------
rem Yii command line script for Windows.
rem
rem This is the bootstrap script for running yiic on Windows.
rem
rem @author Qiang Xue <qiang.xue@gmail.com>
rem @link http://www.yiiframework.com/
rem @copyright Copyright © 2008 Yii Software LLC
rem @license http://www.yiiframework.com/license/
rem @version $Id: yiic.bat 2 2008-09-28 12:03:53Z qiang.xue $
rem -------------------------------------------------------------
@setlocal
set YII_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
%PHP_COMMAND% "%YII_PATH%yiic" %*
@endlocal
I suppose that the %PATH% you tell me, in this case is called %PHP_COMMAND% i have to replace it with the path to my php.exe file.
my new file look like:
@echo off
rem -------------------------------------------------------------
rem Yii command line script for Windows.
rem
rem This is the bootstrap script for running yiic on Windows.
rem
rem @author Qiang Xue <qiang.xue@gmail.com>
rem @link http://www.yiiframework.com/
rem @copyright Copyright © 2008 Yii Software LLC
rem @license http://www.yiiframework.com/license/
rem @version $Id: yiic.bat 2 2008-09-28 12:03:53Z qiang.xue $
rem -------------------------------------------------------------
@setlocal
set YII_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND="C:archivos de programaeasyPHP 2.0b1php5php.exe"
%PHP_COMMAND% "%YII_PATH%yiic" %*
@endlocal
I execute te file again and ready!
Thank you very much
#4
Posted 05 December 2008 - 04:30 PM
Hi Biktor,
Changing the path in the bat file is not recommended. This is because, the yiic.bat is a generated file and comes with the framework (avoid changing framework files if possible, submit a ticket if something is not right).
A better approach is to update your %PATH% environment variable as outlined in the following post:
http://www.yiiframew...943.html#msg943
In particular, see http://www.rasyid.ne...th-for-php-cli/
Cheers, Wei.
Changing the path in the bat file is not recommended. This is because, the yiic.bat is a generated file and comes with the framework (avoid changing framework files if possible, submit a ticket if something is not right).
A better approach is to update your %PATH% environment variable as outlined in the following post:
http://www.yiiframew...943.html#msg943
In particular, see http://www.rasyid.ne...th-for-php-cli/
Cheers, Wei.
#5
Posted 06 December 2008 - 06:37 AM
Hi Biktor,
actually when I refered to the %PATH% environment variable I was really refering to it (and not the %PHP_COMMAND% batch variable ... which is best to not modify).
%PATH% is defined at the System level and with the links posted by wei you should be able to modify %PATH% with no trouble.
... y no era una tonteria sino una cosa que habia que conocer 
ciao
actually when I refered to the %PATH% environment variable I was really refering to it (and not the %PHP_COMMAND% batch variable ... which is best to not modify).
%PATH% is defined at the System level and with the links posted by wei you should be able to modify %PATH% with no trouble.
ciao
Share this topic:
Page 1 of 1

Help












