Hello Chris,
having some trouble to install Rights on clean yiic application. My config/main.php:
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.rights.components.*',
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
// 'allowAutoLogin'=>true,
'class'=>'RightsWebUser',
),
'authManager'=>array(
'class'=>'RightsAuthManager',
// 'class'=>'CDbAuthManager',
// 'connectionID'=>'db',
),
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=test',
'emulatePrepare' => true,
'username' => 'test',
'password' => 'passwd',
'charset' => 'utf8',
),
'errorHandler'=>array(
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning, info',
),
array(
'class'=>'CWebLogRoute',
),
),
),
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'passwd',
'ipFilters'=>array('192.168.*'),
),
'rights'=>array(
'install'=>true,
),
),
'params'=>array(
'adminEmail'=>'webmaster@example.com',
),
);
When I try to access index.php?r=rights it throws me an exception:
Quote
PHP Error
Description
include(User.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
Source File
/usr/share/yii/yii-1.1.3.r2247/framework/YiiBase.php(338)
00326: * @param string class name
00327: * @return boolean whether the class has been loaded successfully
00328: */
00329: public static function autoload($className)
00330: {
00331: // use include so that the error PHP file may appear
00332: if(isset(self::$_coreClasses[$className]))
00333: include(YII_PATH.self::$_coreClasses[$className]);
00334: else if(isset(self::$_classes[$className]))
00335: include(self::$_classes[$className]);
00336: else
00337: {
00338: include($className.'.php');
00339: return class_exists($className,false) || interface_exists($className,false);
00340: }
00341: return true;
00342: }
00343:
00344: /**
00345: * Writes a trace message.
00346: * This method will only log a message when the application is in debug mode.
00347: * @param string message to be logged
00348: * @param string category of the message
00349: * @see log
00350: */
Stack Trace
#0 /usr/share/yii/yii-1.1.3.r2247/framework/YiiBase.php(338): autoload()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /var/www/localhost/htdocs/yii-demos/testapp/protected/modules/rights/components/RightsAuthorizer.php(500): class_exists()
#4 /usr/share/yii/yii-1.1.3.r2247/framework/base/CComponent.php(152): RightsAuthorizer->setUser()
#5 /usr/share/yii/yii-1.1.3.r2247/framework/YiiBase.php(208): RightsAuthorizer->__set()
#6 /usr/share/yii/yii-1.1.3.r2247/framework/base/CModule.php(362): createComponent()
#7 /var/www/localhost/htdocs/yii-demos/testapp/protected/modules/rights/RightsModule.php(161): RightsModule->getComponent()
#8 /var/www/localhost/htdocs/yii-demos/testapp/protected/modules/rights/controllers/InstallController.php(34): RightsModule->getAuthorizer()
#9 /usr/share/yii/yii-1.1.3.r2247/framework/web/CWebApplication.php(323): InstallController->init()
#10 /usr/share/yii/yii-1.1.3.r2247/framework/web/CWebApplication.php(121): CWebApplication->runController()
#11 /usr/share/yii/yii-1.1.3.r2247/framework/base/CApplication.php(135): CWebApplication->processRequest()
#12 /var/www/localhost/htdocs/yii-demos/testapp/index.php(13): CWebApplication->run()
2010-08-24 21:41:53 Apache Yii Framework/1.1.3
Thanks in advance,
cbi