2017-11-14 20:50:59 3197次浏览 2条回答 0 悬赏 10 金钱
[warning][yii\debug\Module::checkAccess] Access to debugger is denied due to IP address restriction. The requesting IP address is 140.207.54.79
    in /www/web/default/zbc/wechat/views/layouts/main.php:67
    in /www/web/default/zbc/wechat/controllers/SiteController.php:52
补充于 2017-11-14 20:51

这个要怎么解决

  • 回答于 2017-11-15 09:14 举报

    把你的ip加到debug模块配置(backend/config/main-local.php) : 'allowedIPs'=>['127.0.0.1','::1']

    3 条回复
    回复于 2017-11-15 09:34 回复

    那个不是高级版yii2的没有backend/config/main-local.php啊

    回复于 2017-11-15 09:43 回复

    没有main-local.php,去生成一下呀

    回复于 2017-11-15 11:03 回复

    app.log日志没显示报错了但是还是配置失败

  • 回答于 2017-11-15 09:42 举报

    线上的话,记得关掉debug

    4 条回复
    回复于 2017-11-15 10:38 回复

    怎么关debug啊

    回复于 2017-11-15 12:04 回复

    web下面的index.php前几行代码就是设置debug的

    回复于 2017-11-15 12:13 回复

    现在日志那里没报错了但是还是连不上微信测试号配置失败

    if (YII_ENV_DEV) {
        // configuration adjustments for 'dev' environment
        $config['bootstrap'][] = 'debug';
        $config['modules']['debug'] = 'yii\debug\Module';
        $config['modules']['debug'] = [
            'class' => 'yii\debug\Module',
            'allowedIPs'=>[
                // '127.0.0.1',
                '120.77.147.96',
                '*.*.*.*',
                //'*',
            ],
        ];
    
    回复于 2017-11-16 09:14 回复

    你现在应该报的不是这个错了,还连不上就是别的问题了,这个问题的原因就是线上环境的时候把debug关了就行

您需要登录后才可以回答。登录 | 立即注册
zbc
职场新人

zbc 深圳

注册时间:2017-11-07
最后登录:2017-11-30
在线时长:4小时27分
  • 粉丝0
  • 金钱45
  • 威望0
  • 积分85

热门问题