Yii Framework Forum: Error running yiic.bat in WinXp - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Error running yiic.bat in WinXp Rate Topic: -----

#1 User is offline   Biktor 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-December 08
  • Location:Medellín, Colombia

Posted 05 December 2008 - 11:34 AM

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!
0

#2 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 647
  • Joined: 29-November 08
  • Location:Paris, France

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 ...

8)

0

#3 User is offline   Biktor 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-December 08
  • Location:Medellín, Colombia

Posted 05 December 2008 - 02:31 PM

Oh!, thank you for your prompt response...

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 &copy; 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 &copy; 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 era una tontería.
0

#4 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

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.
0

#5 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 647
  • Joined: 29-November 08
  • Location:Paris, France

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

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users