Home >Backend Development >PHP Tutorial >Yii 403 error occurs when accessing Gii (scaffolding)_PHP tutorial

Yii 403 error occurs when accessing Gii (scaffolding)_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:10:201159browse

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477534.htmlTechArticleToday I configured Yii framework v1.1.3 in the virtual machine server and tested the Gii settings of the project. The result appears# 403 error page: Error 403 You are not allowed to access this page. Start...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn