Gii 403 forbidden

I can’t seem to get past a 403 message when using Gii. Running the latest yii (as of this posting date) on a Mac and using Xampp - php5.2.4


// autoloading model and component classes








            'password'=&gt; 'mylocal',

            'ipFilters'=&gt; array('localhost', ''),





// application components


Setting the password to false does not work. Any suggestions?

Mine is working fine, take a look and see if it might help…

I’ve got it setup this way :

$aEnable = array( ) ;

<snip> … </snip>

$aEnable[‘gii’] = true ; // <— SET TO {true, false} [default = false] [MAKE CHANGES]

$aEnable[‘gii_modules’] = $aEnable[‘gii’] ; // [ OVER-RIDE IF REQUIRED]

$aEnable[‘gii_modules_generator_paths’] = $aEnable[‘gii’] ; // [ OVER-RIDE IF REQUIRED]

$aEnable[‘gii_components_url_manager_rules’] = $aEnable[‘gii’] ; // [ OVER-RIDE IF REQUIRED]

As you can see above, I set a flag with three components {‘gii_modules’, ‘gii_modules_generator_paths’, ‘gii_components_url_manager_rules’}

Take a peek at my yii website, it is not finished yet, but I’ve started putting quite a bit of stuff on it already.

Select : --> Programming --> Yii Framework --> Easy Configuration

I’ve got mine disabled, but newFileMode should not have the executable flag set. Your 0777 should be 0666. I don’t think this is causing your problem though.

// $aArray[‘modules’][‘gii’] [‘newFileMode’] = 0666 ;

// $aArray[‘modules’][‘gii’] [‘newDirMode’] = 0777 ;

The 403 message is Apache’s way let you know to check the permissions.

Good Luck,

Bill Hernandez

Plano, Texas

Try to disable ipFilters for a test. If that works, you seem to have another client IP for your request. You can find out by adding this line on top of your index.php:


If previous post is not clear for you, read this.

Try to check your ip from which you connect to your site, for this do:

  1. Go to:


  1. Find this part:

protected function allowIp($ip)



		return true;

	foreach($this->ipFilters as $filter)


		if($filter==='*' || $filter===$ip || (($pos=strpos($filter,'*'))!==false && !strncmp($ip,$filter,$pos)))

			return true;


	return false;


  1. Set "echo $ip;" at the start of method.

  2. Try to load gii main page, it’ll show you your ip address.

  3. After that remove or comment this codeline.

  4. Set ipFilters setting to your ip

‘ipFilters’=> array(‘localhost’, ‘’,,

I don’t know yet why, but my gii showed me that my ip is (my real local ip is . is my router ip address. May be in some time you’ll see more interesting ip.