Dear Spyros,
Thanks for your quick reply. Here is my config file.
<?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.srbac.controllers.SBaseController',
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// added from larry's page http://blog.dmcinsights.com/2009/11/03/configuring-yii/
/*
'urlManager'=> array(
'urlFormat'=>'path'
),
*/
// uncomment the following to enable URLs in path-format
/*
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
*/
// uncomment the following to use a MySQL database
'db'=>array(
// added for rbac
'class'=>'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'myusername',
'password' => 'mypassword',
'charset' => 'utf8',
),
// added for rbac start
'authManager'=>array(
// The type of Manager (Database)
'class'=>'CDbAuthManager',
// The database component used
'connectionID'=>'db',
// The itemTable name (default:authitem)
'itemTable'=>'items',
// The assignmentTable name (default:authassignment)
'assignmentTable'=>'assignments',
// The itemChildTable name (default:authitemchild)
'itemChildTable'=>'itemchildren',
),
'srbac' => array(
'userclass'=>'User', //optional defaults to User
'userid'=>'user_ID', //optional defaults to userid
'username'=>'username', //optional defaults to username
'debug'=>true, //optional defaults to false
'pageSize'=>10, //optional defaults to 15
'superUser' =>'Authority', //optional defaults to Authorizer
'css'=>'srbac.css', //optional defaults to srbac.css
'layout'=>
'application.views.layouts.main', //optional defaults to
// application.views.layouts.main, must be an existing alias
'notAuthorizedView'=>
'srbac.views.authitem.unauthorized ', // optional defaults to
//srbac.views.authitem.unauthorized, must be an existing alias
'alwaysAllowed'=>array( //optional defaults to gui
'SiteLogin','SiteLogout','SiteIndex','SiteAdmin',
'SiteError', 'SiteContact'),
'userActions'=>array(//optional defaults to empty array
'Show','View','List'),
'listBoxNumberOfLines' => 15, //optional defaults to 10
'imagesPath' => 'srbac.images', //optional defaults to srbac.images
'imagesPack'=>'noia', //optional defaults to noia
'iconText'=>true, //optional defaults to false
'header'=>'srbac.views.authitem.header', //optional defaults to
// srbac.views.authitem.header, must be an existing alias
'footer'=>'srbac.views.authitem.footer', //optional defaults to
// srbac.views.authitem.footer, must be an existing alias
'showHeader'=>true, //optional defaults to false
'showFooter'=>true, //optional defaults to false
'alwaysAllowedPath'=>'srbac.components', //optional defaults to srbac.components
// must be an existing alias
),
// rbac addition ends
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
/*
array(
'class'=>'CWebLogRoute',
),
*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'pannet1@example.com',
),
);
my YII framework and testdrive application is outside my webroot
YII: /home/pannet1/Templates/yii
testdrive webapp: /home/pannet1/Templates/yii/testdrive/
testdrive home page
View file: /home/pannet1/Templates/yii/testdrive/protected/views/site/index.php
Layout file: /home/pannet1/Templates/yii/testdrive/protected/views/layouts/main.php
i am exposing only the testdrive folder as softlink under my webroot like
/home/pannet1/public_html/testdrive
could this be causing the trouble.