Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed IP's bug #457

Open
vkamelin opened this issue May 12, 2021 · 1 comment
Open

Allowed IP's bug #457

vkamelin opened this issue May 12, 2021 · 1 comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug

Comments

@vkamelin
Copy link

What steps will reproduce the problem?

config:

    'bootstrap' => ['debug', 'gii'],
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            'allowedIPs' => ['*']
        ],
        'gii' => [
            'class' => 'yii\gii\Module',
        ]
    ],

What's expected?

Panel works

What do you get instead?

$debug = Yii::$app->getModule('debug');

$debug->allowedIPs returns:

array(2) {
  [0]=>
  string(9) "127.0.0.1"
  [1]=>
  string(3) "::1"
}

Panel doesn't works

Additional info

If manualy change allowedIPs in yii\debug\Module.php, it returns ['*'] and panel works

Q A
Yii version 2.0.41.1
PHP version 7.4.3
Operating system Ubuntu 20.04.2
@bizley bizley added status:to be verified Needs to be reproduced and validated. type:bug Bug labels May 12, 2021
@AlexOConnorHub
Copy link

It looked like I had this problem earlier today, and but it turned out to be file permission problems for me. Hopefully you figured something out, but for anyone else having a problem like this and who find their way here, check if you are getting a 404 error in the dev tools of your web browser (which is what I had). If so, make sure the user/group permissions allow the server to write to the runtime/debug directory. I set the runtime/ directory to 777, made it such that it is owned by the http:http user/group, and deleted everything in it, allowing the server to recreate the directory structure it needed, and allowing the server to access said directories. I'm pretty sure I could get away with just user:http and 664, but as I'm not worried about security with this like I would for a production server, it works so why change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants