Yii Framework Forum: Yiic problem - Yii Framework Forum

Jump to content

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

Yiic problem Yiic does not open input file Rate Topic: -----

#1 User is offline   Antonio.A 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 09-December 10

Posted 29 August 2011 - 07:57 AM

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

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 29 August 2011 - 08:07 AM

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
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Antonio.A 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 09-December 10

Posted 30 August 2011 - 09:59 AM

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.

View PostAntonio.A, on 29 August 2011 - 07:57 AM, said:

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

Antonio
0

#4 User is offline   equatorlounge 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 03-October 11
  • Location:rondebosch, cape town

Posted 03 October 2011 - 03:56 AM

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

Attached File  screenshot-yii-error.jpg (48.47K)
Number of downloads: 18

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 !


0

#5 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 03 October 2011 - 04:09 AM

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
Find more about me.... btw. Do you know your WAN IP?
0

#6 User is offline   equatorlounge 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 03-October 11
  • Location:rondebosch, cape town

Posted 03 October 2011 - 05:37 AM

View Postmdomba, on 03 October 2011 - 04:09 AM, said:

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 !

Attached File  yiic-error-urrr.gif (27.92K)
Number of downloads: 20

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

#7 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 03 October 2011 - 05:54 AM

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

Find more about me.... btw. Do you know your WAN IP?
0

#8 User is offline   equatorlounge 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 03-October 11
  • Location:rondebosch, cape town

Posted 03 October 2011 - 07:00 AM

View Postmdomba, on 03 October 2011 - 05:54 AM, said:

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 !
Attached File  yiic-error-2.gif (29.98K)
Number of downloads: 13
0

#9 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 03 October 2011 - 07:19 AM

Strange because yiic.bat does just what you did first

it makes a call like "php yiic"
Find more about me.... btw. Do you know your WAN IP?
0

#10 User is offline   Hobbiest 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 13-January 12

Posted 20 January 2012 - 08:18 PM

View Postequatorlounge, on 03 October 2011 - 07:00 AM, said:

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 !
Attachment yiic-error-2.gif


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

#11 User is offline   Hans Nataniel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-October 12

Posted 12 October 2012 - 12:05 AM

View PostMaurizio Domba, on 29 August 2011 - 08:07 AM, said:

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


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

#12 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 12 October 2012 - 03:01 AM

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

http://www.windowsit...my-system-path-
http://msdn.microsof...y/ee537574.aspx
Find more about me.... btw. Do you know your WAN IP?
0

#13 User is offline   tuandv 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-October 12

Posted 14 October 2012 - 09:50 PM

Maybe because of your path!
0

#14 User is offline   Ednei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 16-May 13

Posted 16 May 2013 - 09:20 PM

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

#15 User is offline   ruderbytes 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 05-November 12
  • Location:Indonesia

Posted 24 May 2013 - 04:03 AM

Quote

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