Are there any instructions on how to configure database access for the yiic command in version 1.0.6?
I tried different things, but none of them worked:
Tried the following protected/config/console.php file:
<?php
// This is the configuration for yiic console application.
// Any writable CConsoleApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Console Application',
'db'=>array(
'class' => 'CDbConnection',
'connectionString'=>'mysql:host=localhost;dbname=my_app',
'charset' => 'UTF8',
'username'=>'root',
'password'=>'root',
),
);
However, I get the following error if I run "protected/yiic shell" from the command line:
exception 'CException' with message 'Property "CConsoleApplication.db" is read only.' in /Library/WebServer/Documents/apps/FeedProxy/framework/base/CComponent.php:151
Is there any reason why the yiic shell can't just look at my "protected/config/main.php" file for figuring out the database connection?
@pclaerhout, how did you fix it exactly,becoz I’m running into the same exception and have also added the db settings but still the same exception.So I would appreciate if you could explain further on the php.ini mix up