Yiic problem

Hi all!

I just installed Yii ver.1-1-8 in my WinXP environment (S.P.3), under folder C:/host/yii-1.1.8.r3324

In Apache httpd.conf Alias has been set for the physical path:


Alias /yii "C:/host/yii-1.1.8.r3324"

Alias /yii/ "C:/host/yii-1.1.8.r3324/"

In my browser (Chrome) http://localhost/yii/requirements/ shows correct settings for the database MySql.

Next, as I run the following DOS commands I receive an error message:


C:\host\yii-1.1.8.r3324\framework>yiic webapp ../anamnesi

Could not open input file: C:\host\yii-1.1.8.r3324\framework\yiic

C:\host\yii-1.1.8.r3324\framework>

I tried some variations: yiic.bat instead of yiic; c:\host\yii-1.1.8.r3324\anamnesi instead of ../anamnesi; but I got always the same result.

I also re-start the PC; re-start Apache service and re-install the whole Yii but without any result.

Can anyone help me?

Thanks!

Antonio

On windows yiic.bat should be executed… that in turns executer the yiic PHP script…

Maybe PHP does not work… Try to run PHP from the command prompt to see if PHP runs and if not add the path of PHP.EXE to the PATH variable

Hi all!

The problem has been solved only after specify the extension php:


C:\>php5_2\php C:/host/yii-1.1.8.r3324/framework/yiic.php webapp /host/yii-1.1.8.r3324/anamnesi

Create a Web application under 'C:\host\yii-1.1.8.r3324\anamnesi'? [Yes|No] y

...

Thanks to all.

[i][font="Georgia"]hi everyone, im also fairly new to the yii environment

ive configured the environment variables in php (system variables)

however when i type YIIPath/framework then yiic webapp ../testdrive in my command line interface (windows), nothing happens

2087

screenshot-yii-error.jpg

i tried typing php in my CLI, something like <?php phpinfo(); ?> :( … nothing happens !!

can someone please help me (see attached for more information), thanks a lot in advance !

when i type php -v, i get the php version stuff, nothing more at present

however the yiic command does not work !

please help !

[/font][/i]

First thing is to check if you have PHP in the command line

try with


php -v

This should print the PHP version… if you get something like “command not found” it means that you dont have PHP CLI installed or maybe you have it but it’s not in the PATH

many thanks for your reply mdomba !

i did try php -v and it worked (i added this on top oO )

so i tried something trial and error basis and it seemed to work !

2091

yiic-error-urrr.gif

all i did was to add the php command line just before yiic !

i typed: php yiic webapp testsite

and it worked!

is that normal !??

In that folder there are two files "yiic" and "yiic.bat" so it seems that your OS tried to execute the one without the extension and that is a script for linux

So it would work even if you called directly the rigth one like


yiic.bat webapp testsite

hello back mdomba !

many thanks for your reply

in fact, when i tried what you just said, it doesnt work !

the command line just gives me another empty command line interface, the same as i type php

:(

see image for more information !

2092

yiic-error-2.gif

Strange because yiic.bat does just what you did first

it makes a call like "php yiic"

I have started to go through "Agile Web Application Development with Yii 1.1 and PHP5" and it states some that some scripts have to specifically be called from a certain directory.

Since it states to do:

% cd WebRoot

% YiiRoot/framework/yiic webapp demo

That you do it that way?

So:

% cd C:\xampp\htdocs\

% cd YII\framework\yiic.bat webapp demo

I don’t know if you have to do this for a fact, sine I have never tried to do it in a different way, but when I follow directions I try to do it exactly so as to eliminate any possible issues.

How can I add PHP.EXE to the PATH variable?

You just need to google a bit… here are some pages:

http://www.windowsitpro.com/article/configuration/how-can-i-add-a-new-folder-to-my-system-path-

http://msdn.microsoft.com/en-us/library/ee537574.aspx

Maybe because of your path!

Hi everyone!

About this kind of issue, I try to prompt the yiic migrate command in the prompt (windows 7 with xampp) and doesn’t work.

When I type in the prompt "C:\xampp\htdocs\myWebApp\protected\> ./yiic migrate create create_some_table" I receive a message error saying: "." is not a recognized command…

How should I do?

whay you type like that?