Yii Framework Forum: Será que o Yii estar com bug !! - Yii Framework Forum

Jump to content

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

Será que o Yii estar com bug !! Rate Topic: -----

#1 User is offline   marcosjrnet 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 29-May 09
  • Location:joão Pessoa

Posted 01 October 2009 - 08:40 AM

Bom Dia Galera.


Eu instalei o yii e quando fui executar o SHELL na pasta protected da nova aplicação apareceu esse erro:

C:\wamp\www\odonto\protected>yiic shell
Error: index.php does not exist or is not an entry script fil

USAGE
yiic shell [entry-script | config-file]

DESCRIPTION
This command allows you to interact with a Web application
on the command line. It provides tools to automatically
generate new controllers, views and data models.

It is recommended that you execute this command under
the directory that contains the entry script file of
the Web application.

PARAMETERS
* entry-script | config-file: optional, the path to
the entry script file or the configuration file for
the Web application. If not given, it is assumed to be
the 'index.php' file under the current directory.


a Solução foi criar um arquivo "index.php" na pasta protected da nova palicação será que existe outra maneira pois ainda não consigo gerar no SHELL o MODEL aparece esse erro:


C:\wamp\www\odonto\protected>yiic shell
Yii Interactive Tool v1.0 (based on Yii v1.0.5)
Please type 'help' for help. Type 'exit' to quit.
>> model pessoas

Fatal error: Call to a member function getDb() on a non-object in C:\wamp\www\yi
i\framework\cli\commands\shell\ModelCommand.php on line 115


testei o banco e o php deu tudo certo, o caminho no path tambem tá ok. mais persiste a mensagem.
0

#2 User is offline   marcosjrnet 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 29-May 09
  • Location:joão Pessoa

Posted 01 October 2009 - 09:05 AM

Fatal error: Call to a member function getDb() on a non-object in C:\wamp\www\yi
i\framework\cli\commands\shell\ModelCommand.php on line 115

A linha que ele fala é essa do Arquivo "ModelCommand.php"
===============================================================================

.........
linha 115-> if(($db=Yii::app()->getDb())!==null)
{
$db->active=true;
if(($table=$db->schema->getTable($tableName))!==null)
{
$required=array();
$integers=array();
$numerical=array();
foreach($table->columns as $column)
{
.............

Agradeço desde já pela atenção vlw. ;)
0

#3 User is offline   Ismael 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 163
  • Joined: 02-June 09
  • Location:Brazil

Posted 01 October 2009 - 09:16 AM

View Postmarcosjrnet, on 01 October 2009 - 08:40 AM, said:

Bom Dia Galera.


Eu instalei o yii e quando fui executar o SHELL na pasta protected da nova aplicação apareceu esse erro:

C:\wamp\www\odonto\protected>yiic shell
Error: index.php does not exist or is not an entry script fil

USAGE
yiic shell [entry-script | config-file]

DESCRIPTION
This command allows you to interact with a Web application
on the command line. It provides tools to automatically
generate new controllers, views and data models.

It is recommended that you execute this command under
the directory that contains the entry script file of
the Web application.

PARAMETERS
* entry-script | config-file: optional, the path to
the entry script file or the configuration file for
the Web application. If not given, it is assumed to be
the 'index.php' file under the current directory.


a Solução foi criar um arquivo "index.php" na pasta protected da nova palicação será que existe outra maneira pois ainda não consigo gerar no SHELL o MODEL aparece esse erro:


C:\wamp\www\odonto\protected>yiic shell
Yii Interactive Tool v1.0 (based on Yii v1.0.5)
Please type 'help' for help. Type 'exit' to quit.
>> model pessoas

Fatal error: Call to a member function getDb() on a non-object in C:\wamp\www\yi
i\framework\cli\commands\shell\ModelCommand.php on line 115


testei o banco e o php deu tudo certo, o caminho no path tambem tá ok. mais persiste a mensagem.



Certamente criar um index.php dentro do protected é ilógico.

Faça algo como.

yiic shell .\config\main.php
1

#4 User is offline   marcosjrnet 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 29-May 09
  • Location:joão Pessoa

Posted 01 October 2009 - 11:44 AM

View PostIsmael, on 01 October 2009 - 09:16 AM, said:

Certamente criar um index.php dentro do protected é ilógico.

Faça algo como.

yiic shell .\config\main.php



VLW meu irmão deu certo essa Bagaça kkkkkkkk ;D cv é o cara.

Obs: (Não gostei do "ilógico") mais tudo bem :P
0

#5 User is offline   Ismael 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 163
  • Joined: 02-June 09
  • Location:Brazil

Posted 01 October 2009 - 07:15 PM

Desculpa, sou nerd sem sentimentos as vezes.

Curto, grosso, objetivo e sem vida.

Minhas apologias.
0

#6 User is offline   marcosjrnet 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 29-May 09
  • Location:joão Pessoa

Posted 02 October 2009 - 07:17 AM

View PostIsmael, on 01 October 2009 - 07:15 PM, said:

Desculpa, sou nerd sem sentimentos as vezes.

Curto, grosso, objetivo e sem vida.

Minhas apologias.


Mais é nos Cedros mais duros que se constroe os melhores barcos.
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