Install yii 1.1.0 in vista with xampp webserver package

Guys, I need a help. I just downloaded yii-1.1.0.r1700 into my pc with windows vista n i have xampp webserver package. I tried to install from the instruction http://blog.dmcinsights.com/2009/10/31/getting-started-with-the-yii-framework/ and it doesnt work. it returned the error “‘php’ is not recognized as an internal or external command, operable program or batch file.” I placed the framework in “C:\xampp\” so become “C:\xampp\yiiframework”. is it must in “C:\xampp\htdocs\” so become “C:\xampp\htdocs\yiiframework”?

Regrads,

Andri

This is not YII related… it’s a problem with running PHP from command prompt…I think you don’t have it in the PATH?

I write the full path of php.exe at bat files and it works for me.

well, the here the step why do i get the error. after unzip yii-1.1.0.r1700.zip, I see folder framework and I move this folder to C:\xampp and rename it to yiiframework so it becomes C:\xampp\yiiframework.

then i go to cmd prompt then runing "cd C:\xampp\yiiframework" then

if I run “yiic webapp c:xampp\php;c:xampp\yiiframework” I got error “‘yiic’ is not recognized as an internal or external command, operable program or batch file.”

if I run “php yiic webapp c:xampp\php;c:xampp\yiiframework” I got error “‘php’ is not recognized as an internal or external command, operable program or batch file.”

You should run as "php yiic …"… but php need to be in the %path% !

Or you can type the path to PHP… eg. c:\xampp\php\php.exe

  • note that I don’t know where PHP.EXE is located in XAMPP, this is just to show you what you have to look for…

So you have to find where is located PHP.EXE and then that location add to PATH or use in the command line…

At yiic.bat you may set the full path of php.exe .


if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\xampp\php\php.exe


C:\xampp\htdocs/framework/yiic webapp  C:\xampp\htdocs/templates


cd C:\xampp\htdocs\eshop

C:\xampp\php\php.exe protected/yiic shell

I changed the yiic.bat to be alike this :

@setlocal

set YII_PATH=C:\xampp\yiiframework

if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\xampp\php\php.exe

%PHP_COMMAND% "%YII_PATH%yiic" %*

@endlocal

then from cmd prompt, I run

php yiic webapp c:\xampp\php\;c:\xampp\yiiframework\

I still got error

‘php’ is not recognized as an internal or external command, operable program or batch file

if I see this line "C:\xampp\htdocs/framework/yiic webapp C:\xampp\htdocs/templates", it means i need to create one application folder named "templates" then compile "C:\xampp\htdocs/framework/yiic webapp C:\xampp\htdocs/templates" this one from cmd prompt?

The C:\xampp\htdocs/templates is just the folder that yii will create the webapp, it may be your application folder.

Untill you solve the PHP not recognized… forget Yii…

Have you checked where PHP.EXE is located?

if you have the path to PHP.EXE you can add it to the PATH variable… and than in the command prompt when you enter PHP -? it will display help instead of what you are getting now.

I just copied folder helloworld from the yii-1.1.0.r1700.zip in folder demo. then from cdm prompt

I run "cd c:\xampp\yiiframework" then I run "c:\xampp\yiiframework webapp c:\xampp\htdocs\helloworld"

I got error “‘c:\xampp\yiiframework’ is not recognized as an internal or external command, operable program or batch file”

ok, here the php.exe location "C:\xampp\php\php.exe"

I suggest you enter your php paths here:

start -> My computer(right click!) -> Advanced Tab -> Environment Variables -> Click Path in System variables -> Edit

Have you looked at this cookbook?

hope this help

bettor

Hi,

I had faced this problem too, but I have solved it

Look it simple! if you have an error when try to use "yiic webapp website", and this always return a messages like "php.exe is not ecognized as an internal or external command,…" --> that mean the php.exe file is not really redicted in right path.

Ok, just do it, it works for me:

Step 1:Open command line

Step 2:Go to the C:/ folder (with me, I setup xampp server in C:/) by command: "cd… C:/"

Step 3:type the following command:


C:/xampp/php/php.exe C:/xampp/htdocs/yii/framework/yiic webapp yourWebsite

And if you command is not error, you with see the Yii ask you confim to create project, and then, every thing I think you can solve by yourself :lol:

good luck

i have uploaded yii main folder(after download) on the server but unable to run the requirement test as the browser is not able to find the path and redirect it to yahoo serach …please help

Do you have a webserver installed ?

If you have a webserver did you put the yii framework in the webserver directory?

just copy your web application folder that generated by yii to your web root.ie.c:\xampp\htdocs\[web application folder]