Search code examples
phpyiigii

I can't get Yii crud to work


I'm struggling to get the Yii crud tool to work for me. I'm using Gii and this is the error I'm getting in my log file:

PHP Fatal error:  Cannot redeclare class CController in /var/www/includes/framework/web/CController.php on line 77

These are the only steps I have taken:

1) Downloaded yii and extracted 'framework' into /var/www/includes

1.5) Created a table called me in my database [EDIT]

2) Executed /var/www/framework/yiic webapp /var/www/web

3) uncommented 'gii'=>array(....) in config/main.php

3.5) Added my database configurations [EDIT]

4) Browsed to http:///index.php?r=gii

5) Navigated through Model generator to create 'me'

6) Navigated through Crud generator using me

7) Browsed to http:///index.php?r=me

Any ideas? I've spent ages on this and now I'm rather annoyed. :(

Thanks for your help in advance.


Solution

  • I'm not sure why this worked but it did.

    I simply renamed the framework directory to yii and it worked. I did nothing else.

    This has confused me but at least it now works.