To fix this, look in your main config file for the modules section for Gii, and add an
ipFilters array that includes your own IP:
// protected/config/main.php
return array(
...
'modules' => array(
'gii' => array(
'class' => 'system.gii.GiiModule',
'password' => 'Enter Your Password Here',
'ipFilters' => array('127.0.0.1', '192.168.1.7'), // EDIT TO TASTE
),
...
The ipFilters property can include as many items as you like, and they can be straight
IP addresses or wildcards such as "192.168.1.*".
IPv6 addresses are supported as well if the underlying platform supports it, and "::1"
represents localhost (which may be required in some configurations).
Be careful not to open Gii to a too-wide audience lest it become a security risk.
Note: Yii 1.1.6 adds the default filter directly to the stock config file:
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
hope solved your problem..
Yii::app()->request->userHostAddress
? – Grudginggii
? Did you made any changes at theUserIdentity.php
? – Maidenhair