cp11
(Cailynjacey)
October 4, 2012, 3:13pm
1
I am trying access the GII generator, and I’ve add the following code to my file like the help files said I should:
‘modules’=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'blah',
'ipFilters'=>array('00.00.00.00'),
'newFileMode'=>0666,
'newDirMode'=>0777,
),
),
Problem is, The moment I add my ip address, when I go to the gii URL, it then redirects me to my site’s default login page (the member login page of the script my site is running on), which is www.domain.com/login
If I remove the ipfilters line, I get a 403 error saying I’m not allowed to access that page.
I did double check that my ip address is correct (just removed it in the above code)
Any help?
Keith
(Kburton)
October 4, 2012, 3:20pm
2
Does the note at the bottom of this page apply to you?
If your application is using path-format URLs with some customized URL rules, you may need to add the following URLs in your application configuration in order to access GiiModule:
'components'=>array(
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'gii'=>'gii',
'gii/<controller:\w+>'=>'gii/<controller>',
'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',
...other rules...
),
)
)
You can then access GiiModule via:
http://localhost/path/to/index.php/gii
cp11
(Cailynjacey)
October 4, 2012, 6:27pm
3
Thanks for the reply, but I just did that, and it doesn’t work… it just redirects me back to the homepage.
cp11
(Cailynjacey)
October 5, 2012, 8:04am
4
Any help anyone? I would really love to get into the generator
softark
(Softark)
October 5, 2012, 2:29pm
5
Do you want to use gii in your remote production machine?
Or, in your local development machine?
And what do you mean by "my ip address"?
cp11
(Cailynjacey)
October 5, 2012, 3:19pm
6
softark:
Do you want to use gii in your remote production machine?
Or, in your local development machine?
And what do you mean by "my ip address"?
It’s not on localhost… it’s on my hosting account. And the help files said to add the “ipFilters” line if you want to connect that way… that’s what I meant.
Keith
(Kburton)
October 5, 2012, 3:26pm
7
And you’re definitely using your external IP address?
cp11
(Cailynjacey)
October 5, 2012, 4:00pm
8
Yes, I’ve double checked it like a zillion times…
Keith
(Kburton)
October 5, 2012, 4:13pm
9
Can you post your URL manager rules here?
cp11
(Cailynjacey)
October 5, 2012, 10:38pm
10
Thanks for the help! But I finally figured it out! It was a setting inside the script I was using. It’s working now! Thanks!