Yii Framework Forum: yiic shell not working (windows xp) - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

yiic shell not working (windows xp) Rate Topic: -----

#1 User is offline   GSTAR 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,035
  • Joined: 30-October 09
  • Location:UK

Posted 28 January 2010 - 06:22 AM

In my <webapp> folder I have folders 'protected' and 'framework'.

In command prompt I navigate to: cd "C:\xampp\htdocs\webapp"

I then type in php protected/yiic shell

But nothing happens. I just get a blank line, followed by command prompt again. No error message.

I have another webapp and the yiic shell works OK with that. So I know it's not an environment/path setting issue.

I have also compared the config files for both the webapps and they are identical.

Anyone have any suggestions on what else could be causing this problem?
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 28 January 2010 - 06:42 AM

View PostGSTAR, on 28 January 2010 - 06:22 AM, said:

In my <webapp> folder I have folders 'protected' and 'framework'.

In command prompt I navigate to: cd "C:\xampp\htdocs\webapp"

I then type in php protected/yiic shell

But nothing happens. I just get a blank line, followed by command prompt again. No error message.

I have another webapp and the yiic shell works OK with that. So I know it's not an environment/path setting issue.

I have also compared the config files for both the webapps and they are identical.

Anyone have any suggestions on what else could be causing this problem?


I read in some other post that restricted access to the default controller could lead to similar behavior. Try adding the config file as second parameter to yiic.

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#3 User is offline   Programming_freak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 08-January 10

Posted 28 January 2010 - 07:44 AM

Try this one...it will work


"protected/yiic" shell

0

#4 User is offline   GSTAR 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,035
  • Joined: 30-October 09
  • Location:UK

Posted 28 January 2010 - 08:54 AM

Quote

Try adding the config file as second parameter to yiic.

Not sure how to do this...


Quote

"protected/yiic" shell

Does not make any difference...

Any other ways I can debug this to find out what is wrong?
0

#5 User is offline   GSTAR 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,035
  • Joined: 30-October 09
  • Location:UK

Posted 28 January 2010 - 09:06 AM

OK I've found out the cause of the problem. In my SiteController I have the following:

public function actionIndex()
{
	$this->redirect(array('/admin'));
}


If I change this to:

public function actionIndex()
{
	$this->render('index');
}


The yiic shell now works fine. But I prefer to redirect the users to index.php?r=admin in the default action. How can this be achieved without causing the yiic shell to break?

('admin' is an action in another controller)
0

#6 User is offline   GSTAR 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,035
  • Joined: 30-October 09
  • Location:UK

Posted 29 January 2010 - 05:09 AM

Anyone got any idea?
0

#7 User is offline   kradle 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 13-August 10

Posted 13 August 2010 - 11:58 PM

para ejecutar el SHELL en Windows a mi me funciono de esta manera

C:\wamp\www\WebEjemplo\protected>yiic shell ../index.php
0

#8 User is offline   transcendx 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-November 11

Posted 23 November 2011 - 08:54 PM

View Postkradle, on 13 August 2010 - 11:58 PM, said:

para ejecutar el SHELL en Windows a mi me funciono de esta manera

C:\wamp\www\WebEjemplo\protected>yiic shell ../index.php

thanks, this helped, but for me this worked:
C:\wamp\www\myproject > C:\wamp\www\yiiRoot\framework\yiic shell
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users