Yii Framework Forum: yiic shell model problem - Yii Framework Forum

Jump to content

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

yiic shell model problem Rate Topic: -----

#1 User is offline   xact 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 28-October 09

Posted 28 October 2009 - 11:16 AM

Hi,

I am not able to create a model with the yiic shell. After typing "model User" the shell always crashes and a CLI (crash-)error message appears. Test-System: WinXP with XAMPP 1.7.0 (PHP 5.2.8, MySQL 5.1.30), yii 1.1a (I tried 1.0.10 and had the same problems).
Output PDO:
print_r(PDO::getAvailableDrivers());
Array
(
    [0] => mssql
    [1] => mysql
    [2] => sqlite2
)


My config - console.php (or should I post the main.php?):
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'My Console Application',

	// application components
	'components'=>array(
		'db'=>array(
			'class'=>'CDbConnection',
			'connectionString'=>'mysql:host=localhost;dbname=yii_test',
			'username'=>'username',
			'password'=>'pw',
		),
	),
);


The command "echo php_ini_loaded_file();" shows the same php.ini as in the browser. Hopefully someone can help me, because I think it´s a great Framework, but I really don´t know what´s wrong.

Thanks and bye
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 28 October 2009 - 11:19 AM

It seems some of your PHP extensions are causing the problem. Try disabling all except the necessary ones.
0

#3 User is offline   xact 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 28-October 09

Posted 28 October 2009 - 12:44 PM

After disabling all extensions except php_pdo.dll and php_pdo_mysql.dll, I have the same Problem. Any ideas?
0

#4 User is offline   xact 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 28-October 09

Posted 28 October 2009 - 03:18 PM

It´s weird but I think XAMPP is responsible. Trying another Test-System with XAMPP 1.7.2 works. Thanks for the fast response.
0

#5 User is offline   mirrorps 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 25-June 09

Posted 03 May 2010 - 07:55 PM

Hi, I'm facing some problems with the shell commands: model & crud. I'm trying to generate the scripts for a specific module, but the scripts are generated outside the module, i.e. the command: crud admin.models.User generates the scripts under /protected/views/User and not under /protected/modules/admin/views/User. I've created the admin module with "shell module" before that. The situation with "shell model .... " is the same. Any ideas ?

Thanks!

Regards,
mirrorps
ToolsFactor.com
e-commerce website built with Yii
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