Hi all,
I’m new to Yii and Giix. No No wait…
I have a simple 6 tables:-
user
permission
group
all linked together with lookup tables
user_has_permission
user_has_group
group_has_permission
The lookup tables are purely user_id,permission_id etc.
I’ve un-installed and re-installed giix 3 times now and last time I’ve kept the yii bundle intact (ie:- not remove the framework folder) and I still get the following error on all occasions.
include(GroupHasPermission.php): failed to open stream: No such file or directory
/var/www/yii-1.1.14/framework/YiiBase.php(427)
415 {
416 include($classFile);
417 if(YII_DEBUG && basename(realpath($classFile))!==$className.'.php')
418 throw new CException(Yii::t('yii','Class name "{class}" does not match class file "{file}".', array(
419 '{class}'=>$className,
420 '{file}'=>$classFile,
421 )));
422 break;
423 }
424 }
425 }
426 else
427 include($className.'.php');
428 }
429 else // class name with namespace in PHP 5.3
430 {
I’ve checked and giix hasn’t automatically created the lookups (I don’t want the lookups to be models as well). But I created the lookups as models anyways and get another error unrelated to this.
I’ve chowned the whole webroot to www-data before trying to generate User, Permission and Group, just incase it wasn’t being written somewhere else.
Anyways, would love to hear from someone who might know what I’m doing wrong
Thanx again
Replicates on live server as well which is running nginx.
I’m obviously doing something wrong in my setup, though I’ve re-read it 4 times now.
Cause I’m new, I’ve been following the yiibook letter by letter. I’m a bit perplexed now, hopefully this is a silly mistake.
Cheers
And of course it all works fine with just gii though it has nothing to do with lookup tables. Rather it’s not expecting a lookup table called GroupHasPermission.php
Ohh here’s the config. No errors being displayed either.
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'ext.giix-components.*', // giix components
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'generatorPaths' => array(
'ext.giix-core', // giix generators
),
'password'=>'xxxx',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
'components'=>array(
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=xxxx',
'emulatePrepare' => true,
'username' => 'xxxx',
'password' => 'xxxx',
'charset' => 'utf8',
),
'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',
),
),
),
),