0

I have just installed YII without any problems, but I cannot get into GII. I have uncommented the specific lines in mywebapp/protected/config/main.php to enable GII.

When I try to go to: localhost/myapp/index.php?r=gii I am redirected to localhost/myapp/index.php?r=gii/default/login.

I don't have the URL manager enabled it is a fresh installation on Wamp.

The error I get is this:

Fatal error: Cannot redeclare class CLogRouter in C:\wamp\www\yii\framework\logging\CLogRouter.php on line 53

The yii folder is the installation folder (did not know that the app is still using it). What could be causing the trouble and how to get GII working? Thanks for your replies!

Vojtech
  • 643
  • 3
  • 16
  • 30

1 Answers1

0

It is not clear what your problem is.

Getting redirected to /gii/default/login is good. This is where you log in with a password.

Your error "Cannot redeclare class CLogRouter" indicates that you are declaring CLogRouter twice. This probably happens in your protected/config/main.php.

However, I am under the impression that this error is not related to gii. Why don't your turn logging off (for now)?

Ivo Renkema
  • 2,188
  • 1
  • 29
  • 40
  • thank you for the answer .. when I turn off logging I can get to the login page of GII but when I fill in the password and click enter, I get redirected to the same login page again and again – Vojtech Apr 10 '13 at 08:47
  • As I understand, this is a new problem, right? Do you get a wrong password message? – Ivo Renkema Apr 10 '13 at 17:09
  • Afterthought: this could be an IP address issue. Can you post the gii section of your config/main.php file? – Ivo Renkema Apr 10 '13 at 17:22
  • Just briefly, turn off IP checking: 'ipFilters' => false. See if that helps. Check here: http://stackoverflow.com/questions/11793121/gii-not-working-in-yii/11793231#11793231 – Ivo Renkema Apr 10 '13 at 17:56