Xampp With Yii (Creating An Application)

Hello,

Im trying to create a yii application (im using version 1.1) for my local xampp installation.

I try to run the following comand in cmd:

c:\XAMPP\php\php.exe c:\XAMPP\htdocs\yii\framework\yiic webapp c:\XAMPP\htdocs\testdrive

If i do this, i become no error but also no application is created.

I also add C:\xampp\php to the path system Variables and try to run:

c:\XAMPP\htdocs\yii\framework\yiic webapp c:\XAMPP\htdocs\testdrive

The result is the same.

Has someone an advide what i can do?

Try this: [C:\xampp\htdocs>php.exe c:\xampp\htdocs\yii\framework\yiic webapp testdrive]

  1. Go to htdocs: cd \xampp\htdocs

  2. Run: php.exe c:\xampp\htdocs\yii\framework\yiic webapp testdrive

Thank you for the advise. In my htdocs folder is no php.exe. The php.exe is placed in C:\xampp\php. I try to run the following:

c:\xampp\php>php.exe C:\xampp\htdocs\yii\framework\yiic webapp C:\xampp\htdocs\t

estdrive

c:\xampp\php>

I become no output and like before there is no application created. It’s possible that there is something wrong with my xampp?

If you added C:\xampp\php to the path system Variables. You can run php.exe everywhere. So if you run:

php.exe c:\xampp\htdocs\yii\framework\yiic webapp testdrive

from c:\xampp\htdocs you avoid to write the path for the testdrive application.

But the way as you has run it, is also correct:

c:\xampp\php>php.exe C:\xampp\htdocs\yii\framework\yiic webapp C:\xampp\htdocs\testdrive

Try with yiic.bat (for windows)

(yours)

c:\xampp\php>php.exe C:\xampp\htdocs\yii\framework\yiic.bat webapp C:\xampp\htdocs\testdrive

(mine)

c:\xampp\htdocs>php.exe c:\xampp\htdocs\yii\framework\yiic.bat webapp testdrive

Thank you again for the advice.

I try to run:

C:\xampp\htdocs\yii\framework\yiic.bat webapp C:\xampp\htdocs\testdrive

This is the full cmd code:


Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.


C:\Users\m>cd c:\xampp\php


c:\xampp\php>php.exe C:\xampp\htdocs\yii\framework\yiic.bat webapp C:\xampp\htdo

cs\testdrive

@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 2008 Yii Software LLC

rem  @license http://www.yiiframework.com/license/

rem  @version $Id$

rem -------------------------------------------------------------


@setlocal


set YII_PATH=%~dp0


if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe


"%PHP_COMMAND%" "%YII_PATH%yiic" %*


@endlocal

c:\xampp\php>

Looks like the script hasen’t run. And there is no application created. Where is the mistake?

Sorry is not yiic.bat is yiic.php.

Do you sure is PHP installed and running?

What is the result if you run php -v?

I have test it with:

C:\xampp\htdocs\yii\framework\yiic.php webapp C:\xampp\htdocs\testdrive

And this works

I have attached an image from my console.

5487

cmd.png

Thank you verry much, its works now :)

The following code works for me:


c:\xampp\php>php.exe C:\xampp\htdocs\yii\framework\yiic.php webapp C:\xampp\htdo

cs\test

Create a Web application under 'C:\xampp\htdocs\test'? (yes|no) [no]:yes

Im just wondering why i cant use "yiic.bat" like you and must use the "yiic.php" data.

Great,

It sounds like a apache / windows configuration problem, maybe you have to restart apache and / or windows also.