[MODULE] phundament 2

Sorry, I could not reproduce the issue yet.

Seems like this is occurs only on WAMP.

I also contacted Spyros, the developer of srbac, maybe he can shed some light.

Best regards,


I fixed a related bug that had to do with empty layout.

change srbac config to "layout"=>"application.views.layouts.main" or whatever your layout is and see if that helps

@schmunk - I did not consider the WAMP issue…but thanks anyways :)

@Spyro - Thanks and will have give it a go at it later

Thanks for immediate support ;) that’s another solid reason why Yii and it’s community has a competitive edge among others!

I tried to use “layout”=>“application.views.layouts.main” instead of “layout”=>“application.views.layouts.admin” but still no effect, I’m using WAMP and standalone Pii.

SRBAC file: C:\wamp\www\pii\modules\pii\modules\srbac\views\authitem\install\installText.php

@Schmunk: By the way, can I develop Pii under one workstation and then put it to other on-line? Because I was not successful in that too :) When working with Yii I was developing site in my laptop and then placing to server was OK.


Check if deleting files in temp folders helps:


  • runtime

  • www/assets

  • www/runtime

Also check if config settings may differ, i.e. database or include paths.

Usually I use SVN updating my sites. But a manual move should also be possible.

What says the error log?


Best practice is to install the app, your webserver also need permissions for the temp folders.


Thanks for replying, after deleting those temp files nothing more happens, just same Install screen :) I use local.php config with servers DB info. This way works fine with Yii testdrive.

Any news on why SRBAC does not work on Pii?

Thanks for help again!

Happy Pii day :slight_smile:

By the way, glad to hear Yii 1.1.1 came out!

Beneficial functionality is added, like filtering, search and so on.

Will Pii take Yii 1.1.1 as a phundament? :slight_smile:

Thanks, very nice, I also noticed the Pi(i) Day ;)

And for sure we’ll use Yii 1.1.1 as the new base. Implementation starts today …

Any news on solving those problems?

Sorry, no news from my side …

But SRBAC should be included automatically when installing Pii yes? Or should it be manually installed?


… It should be automatically installed.

Then I suppose it could be SRBAC + WAMP problems. Any news from Spyros? Has anyone set up SRBAC under WAMP?

Thanks for everyone’s contribution! Together we can make Yii and all extensions and projects even more efficient!

I am using srbac under xampp

Which version of srbac, Yii do you use?

What’s exactly is the problem?

Basically when installing Pii it includes SRBAC as a module within Pii database, but when trying to access role, tasks, etc, install screen appears:


I tried to install SRBAC on clean Yii testdrive, same problem.

And I can not find the problem :)

Using Yii 1.1.1 (also same problem with Yii 1.1.0)


Latest Pii

Thanks for quick response, hope to move fast forward when together solving all of those compatibility issues :)

Did you tried setting layout => "application.views.layouts.main" ?

This was a bug that was fixed in the last version

First of all, SRBAC install problems with Yii was fixed by removing from config "_red" .css(srbac_red.css came from example in demo web), then came error about View NotAuthorized(this string also came from demo web example), fixed with replacing by existing one:


Now Yii 1.1.1 + latest SRBAC works fine now.

But the main issue in my case is to determinate why Pii+Srbac does not work well on WAMP.

I also started to check config because only install screen is popping out, and Install button was disabled until I added default layout string in config as you suggested:


Under C:\wamp\www\pii\modules\pii\config\pii.php

Everyone is welcome to suggest or trace possible error(s) that causes SRBAC not to work well on Pii using WAMP.


What do you mean by "not working well"?

Doesn’t install?

It installs but you can’t create / assign authorities?

I’ll check out Pii tomorrow and see if I can help

As Schmunk(The author of Pii) has told - after installing Pii srbac should be installed automatically too.

The meaning of “not working well” is as I try to access management of already created roles, tasks, etc. I get install screen with disabled Install button(means some error occur(still I believe no install screen should ever appear in here)). This is the main problem:) And I believe its only on Wamp because I do not see other complaints except @Seal’s posts :)

I added layout string(post above) and then tried to reinstall srbac, however it still drops install screen and puts Pii administrator bar offline :) (fixed it by changing DB type from MyISAM to InnoDB and added missing records(from original Pii SQL dump).

All of that is done of course with Windows(XP) and WAMP. Have not tried to install Pii on other systems nor applications. But WAMP is often used so I believe Pii should be WAMP compatible if it wants to be Windows compatible ;)

Thanks for contribution everyone!

There’s an isInstalled method in srbacModule.php


 public function isInstalled() {

    try {

      $tables = Yii::app()->authManager->db->schema->tableNames;

      $tableName = AuthItem::model()->tableName();

      $tablePrefix = AuthItem::model()->getDbConnection()->tablePrefix;

      if(!is_null($tablePrefix)) {

        $tableName = preg_replace('/{{(.*?)}}/',$tablePrefix.'\1',$tableName);


      if(in_array($tableName, $tables)) {

        return true;


      return false;

    } catch (CDbException  $ex )  {

      return false;




Probably for some reason it always returns false

To check if the problem is there change it to return true and see if srbac works .