Install yii 1.1.0 in vista with xampp webserver package
#1
Posted 17 February 2010 - 10:01 PM
Regrads,
Andri
#2
Posted 18 February 2010 - 02:40 AM
andritjia, on 17 February 2010 - 10:01 PM, said:
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?
#3
Posted 18 February 2010 - 02:56 AM
#4
Posted 18 February 2010 - 03:49 AM
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."
#5
Posted 18 February 2010 - 04:00 AM
andritjia, on 18 February 2010 - 03:49 AM, said:
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...
#6
Posted 18 February 2010 - 04:03 AM
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
#7
Posted 18 February 2010 - 04:39 AM
mdomba, on 18 February 2010 - 04:00 AM, said:
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...
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
#8
Posted 18 February 2010 - 04:47 AM
dimis283, on 18 February 2010 - 04:03 AM, said:
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
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?
#9
Posted 18 February 2010 - 04:56 AM
andritjia, on 18 February 2010 - 04:47 AM, said:
The C:\xampp\htdocs/templates is just the folder that yii will create the webapp, it may be your application folder.
#10
Posted 18 February 2010 - 04:57 AM
andritjia, on 18 February 2010 - 04:39 AM, said:
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.
#11
Posted 18 February 2010 - 05:19 AM
dimis283, on 18 February 2010 - 04:56 AM, said:
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"
#12
Posted 18 February 2010 - 05:23 AM
mdomba, on 18 February 2010 - 04:57 AM, said:
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.
ok, here the php.exe location "C:\xampp\php\php.exe"
#13
Posted 18 February 2010 - 06:12 AM
andritjia, on 17 February 2010 - 10:01 PM, said:
Regrads,
Andri
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
#14
Posted 13 September 2011 - 02:52 AM
andritjia, on 18 February 2010 - 05:23 AM, said:
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
good luck
#15
Posted 01 October 2011 - 02:04 AM
#16
Posted 01 October 2011 - 05:55 AM
If you have a webserver did you put the yii framework in the webserver directory?

Help















