Archive for the ‘webframework’ Category

Fix gii 403 Error in yii

September 6, 2010 5 comments

This labor day weekend I’ve been learning yii – a php framework by reading the recently published Agile Web Application Development with Yii1.1 and PHP5. While trying to get the gii code generator working I got stuck somehow by a 403 error. Googling around and all solutions talk about adding the following bold line

return array(
            'ipFilters'=>array(...a list of IPs...), // ***

to the main configuration file. A bit configuration info about my server set: server is a headless sheevaplug with Ubuntu 9.04 with php 5.2, yii 1.1.4 (just released this weekend). Server ip is and the web client’s ip (where I am trying to access gii) is I added to the ipFilters array but still didn’t work. A bit more googling points me to and I added
to top of the main index.php file and I saw this line:


This explains why adding didn’t work, it seems my sheevaplug recognizes the remote client’s ip in ipv6 format and after adding the above string to ipFilters array the problem was solved.

Categories: php, webframework, yii