1
votes

exception 'CException' with message 'Property "CConsoleApplication.defaultContro ller" is not defined.' in ..\yiisoft\yii\framework\base\CComponent.php:173

Have someone stucked with this error? What's the solution?

Thanks for responce.

exception 'CException' with message 'Property "CConsoleApplication.defaultContro ller" is not defined.' in C:\xampp\htdocs\projects...\vend or\yiisoft\yii\framework\base\CComponent.php:173 Stack trace:

0 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(513): CComponent->__set('defaultControll...', 'users/user')

1 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(150): CModule->configure(Array)

2 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\YiiBase.php(125): CApplication->__construct('C:\xampp\htdocs...')

3 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\YiiBase.php(113): YiiBase::createApplication('CConsoleApplica...', 'C:\xampp\htdocs...')

4 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\yiic.php(23): YiiBase::createConsoleApplication('C:\xampp\htdocs...')

5 C:\xampp\htdocs\projects...\app\yiic.php(7): require_on

in additional if I remove defaultController I recieve this error:

exception 'CException' with message 'CConsoleApplication and its behaviors do no t have a method or closure named "getSession".' in C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CComponent.php:266 Stack trace:

0 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\web\auth\CWebUser.php(193): CComponent>__call('getSession', Array)

1 C:\xampp\htdocs\projects...vendor\yiisoft\yii\framework\web\auth\CWebUser.php(193): CConsoleApplication->getSession()

2 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(387): CWebUser->init()

3 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(103): CModule->getComponent('user')

4 C:\xampp\htdocs\projects...\app\modules\users\UsersModule.php(30): CModule->__get('user')

5 C:\xampp\htdocs\projects...\app\components\RequestHandler.php(23): UsersModule->menu()

6 [internal function]: RequestHandler::onBeginRequest(Object(CEvent))

7 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CComponent.php(559):call_user_func(Array,Object(CEvent))

8 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(196): CComponent->raiseEvent('onBeginRequest', Object(CEvent))

9 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(167): CApplication->onBeginRequest(Object(CEvent))

10 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\yiic.php(33): CApplication->run()

11 C:\xampp\htdocs\projects...\app\yiic.php(7): require_oonce

1
Gonna need more information to help with this one. Can you paste in your full error stack trace?JamesG
already fixed by me, tnx.Gleb

1 Answers

0
votes

CConsoleApplication.defaultController <- Error

console.php = config To CConsoleApplication Check root/protected/config/console.php is set defaultController