0

I am trying to start gii generator but for some reason it doesn't start. I am working in web server not in my localhost. I set the gii in the config file like this:

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20', '195.178.49.18'],
    ];
}
iehrlich
  • 3,572
  • 4
  • 34
  • 43

2 Answers2

0

If you have not setted an urlmanager for prettyUrl You should use the default routing sintax

 https://your_app/web/index.php?r=gii 
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
0

i think its too late now to answer, but not too late. if you'r using advance template, then you need to add your IP in your backend/config/main-local.php or frontend/config/main-local.php. Basically you have to add your ip for both ends. if you are not sure about your ip, then you can use '*' for allowing all ip(dont forget to change it after work in done), like -> 'allowedIPs' => ['127.0.0.1', '::1', '192.168.33.1', '*.*.*.*'] .

$config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['127.0.0.1', '::1', '*.*.*.*']
        ];