yii: using gii outside localhost

by prettyscripts on 2010-07-30 11:37:13

phpframeworkyii

i'm currently reviewing / learning yii, another php framework. while following the guide to configure gii, i wasn't able to access gii. 403 error was displayed.

it's because by default gii only allow access via localhost. if you're like me having a separate development server, an additional configuration is required - ipFilters:

PHP:

return array(
    ......
    'modules'=>array(
        'gii'=>array(
            'class'=>'system.gii.GiiModule',
            'password'=>'your-password',
            'ipFilters'=>array(...list of IPs...), // ***
        ),
    ),
);

line 7: add this line and enter list of ip addresses that are allowed to access gii. if you're access the site via proxy, enter the ip address of proxy server.

update: as of V116 ipFilters is included in project skeleton. just edit the ip address.

Tags: framework, gii, php, yii

2 comments

Comment by Termos @ 2010-09-29 05:13:15
****-
Thanks, exactly what i was looking for ;)
Comment by Mauvis @ 2010-10-17 04:58:26
*****
How confusing was this. I also had this issue and am glad I found the page. Silly Yii.

Leave a comment


Your email address will not be revealed on this site.
PoorExcellent
note: all comments are moderated. do not spam and do not advertise. only comments relevant to the post will be published.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)