Error when using authManager

When I add this line to the config/main.php file , I am getting the below exception. Can someone help.

‘authManager’ => array(

	'class' => 'CDbAuthManager',


	'connectionID' =>'db',


 ),

CException

Description

Property "CWebApplication.authManager" is read only.

Source File

E:\WWW\yii\framework\base\CModule.php(449)

00437: }

00438: }

00439:

00440: /**

00441: * Configures the module with the specified configuration.

00442: * @param array the configuration array

00443: */

00444: public function configure($config)

00445: {

00446: if(is_array($config))

00447: {

00448: foreach($config as $key=>$value)

00449: $this->$key=$value;

00450: }

00451: }

00452:

00453: /**

00454: * Loads static application components.

00455: */

00456: protected function preloadComponents()

00457: {

00458: foreach($this->preload as $id)

00459: $this->getComponent($id);

00460: }

00461:

Stack Trace

#0 E:\WWW\yii\framework\base\CModule.php(449): CComponent->__set(‘authManager’, Array)

#1 E:\WWW\yii\framework\base\CApplication.php(117): CModule->configure(Array)

#2 E:\WWW\yii\framework\YiiBase.php(112): CApplication->__construct(‘E:\WWW\tracksta…’)

#3 E:\WWW\yii\framework\YiiBase.php(85): YiiBase::createApplication(‘CWebApplication’, ‘E:\WWW\tracksta…’)

#4 E:\WWW\trackstar\index.php(13): YiiBase::createWebApplication(‘E:\WWW\tracksta…’)

#5 {main}

Are you adding this in your components configuration?

Yes.

In the config/main.php file.

Could you post your config file here?

I attached the file. Please have a look .

AuthManager config must be in the components array




<?php

'components'=>array(

	'authManager' => array(

		'class' => 'CDbAuthManager',

		'connectionID' =>'db',

	 ),

'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

		),

....

?>



OK. Cool Thanks for you help. It is working now.