Gii 403 Error

This is my first time ever trying and installing Yii, and I followed the instructions here:

When it came time to load up Gii, I tried the URL, and I inexplicably got 403 Error message. After Googling around for a while, I found out that I had to add the ipFilters entry to the gii array in main.php. See here:






This fixed the problem. I tried posting a comment to the quickstart app page linked above, but I am too new to post there. I just wanted to share this in case it comes up for anyone else, but it did almost prevent me from trying out Yii, so we may want to consider adding a note about this on the tutorial page.

This way Gii will work for everyone as it uses $_SERVER[‘REMOTE_ADDR’]…

the idea behind ipFilters is to enter only your WAN IP… so that other users cannot use Gii to mess with your project…

instead of using $_SERVER[‘REMOTE_ADD’], put your computers’ ip address in there.

i.e. if your Yii installation is on a computer in your network, and you are accessing yii through a browseron a different computer on your LOCAL network (not the web), put your LOCAL ip address, i.e., etc

that would restrict access to only your computer.

also if you computer’s local ip address changes, ie. it’s set to auto get an ip from dhcp, then be aware this may limit your ability to access the gii tool. you’ll have to edit that value in the mani config file.

i had a error 403 access denied, i searched what was wrong hier


and i have tried this:








now i see that i used shared ip, i had to use local ip

(cPanel show only shared ip)