我是yii的新手,我需要安装yii用户模块我被困在迁移命令中:
Run command: yiic migrate --migrationPath=user.migrations
我搜索了帮助,我找到了这个命令:
yiic migrate --migrationPath=application.modules.user.migrations
我正在使用yiic.php:... / protected / yiic.php
错误是:
exception 'CException' with message 'Property "CConsoleApplication.log" is not defined.' in /srv/data/var/php/www/yii-1.1.15.022a51/framework/base/CComponent.php:173
堆栈追踪:
#0 /srv/data/var/php/www/yii-1.1.15.022a51/framework/base/CModule.php(513): CComponent->__set('log', Array)
#1 /srv/data/var/php/www/yii-1.1.15.022a51/framework/base/CApplication.php(161): CModule->configure(Array)
#2 /srv/data/var/php/www/yii-1.1.15.022a51/framework/YiiBase.php(125): CApplication->__construct('/srv/data/web/v...')
#3 /srv/data/var/php/www/yii-1.1.15.022a51/framework/YiiBase.php(113): YiiBase::createApplication('CConsoleApplica...', '/srv/data/web/v...')
#4 /srv/data/var/php/www/yii-1.1.15.022a51/framework/yiic.php(23): YiiBase::createConsoleApplication('/srv/data/web/v...')
#5 /srv/data/web/vhosts/www.myWebsite.com/htdocs/protected/yiic.php(7): require_once('/srv/data/var/p...')
#6 /srv/data/web/vhosts/www.myWebsite.com/htdocs/protected/yiic(4): require_once('/srv/data/web/v...')
#7 {main}hosting-user@me:~/web/vhosts/www.myWebsite.com/htdocs/protected$
答案 0 :(得分:0)
您的控制台应用程序没有log
组件。
尝试在console.php
数组中的components
配置中添加此代码:
'components'=>array(
...
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
...
),