Home >Backend Development >PHP Tutorial >Yii 403 error occurs when accessing Gii (scaffolding)_PHP tutorial
Today I configured Yii framework v1.1.3 in the virtual machine server and tested the Gii settings of the project,
The result is #403 error page:
Error 403
You are not allowed to access this page.
At first, I mistakenly thought it was due to insufficient file authorization. After modifying the file and folder authorization, it still remained the same. After checking the wiki on the official website, I found that for security reasons, Yii only allows access to Gii on the local machine by default.
To solve this problem, modify the configuration as follows:
'modules' => array(
'gii' => array(
'class' => 'system.gii.GiiModule',
'password' => 'password',
'ipFilters' => array('10.0.0.119'),
),
)
Modify the ipFilters definition and add the IP of the work machine to the allowed access list, that is,
'ipFilters' => array('10.0.0.119')
Finally, you can access Gii normally on your work machine.