Guten Morgen,
da ich auf der Suche nach einer Alternative zu ZF bin. Hat Google mich vor paar Tagen auf Yii aufmerksam gemacht.
Nun bin ich dabei das Handbuch zu lesen und wollte meine erste Yiic App generieren. Was auch ohne weitere Fehler geklappt hat.
Beim Aufruf des generierten kommt dann.
Fatal error: Cannot redeclare class Controller
Gehe ich in die Class Datei und speichere die nochmal ab ist der Fehler weg, dann kommt ein andere und zwar diese
Stack Trace
#0
+ E:\xampp\vhosts\yii\framework\web\CBaseController.php(119): require("E:\xampp\vhosts\yii\blog\protected\views\layouts\column1.php")
#1
+ E:\xampp\vhosts\yii\framework\web\CBaseController.php(88): CBaseController->renderInternal("E:\xampp\vhosts\yii\blog\protected\views/site\contact.php", array("model" => ContactForm), true)
#2
+ E:\xampp\vhosts\yii\framework\web\CController.php(866): CBaseController->renderFile("E:\xampp\vhosts\yii\blog\protected\views/site\contact.php", array("model" => ContactForm), true)
#3
+ E:\xampp\vhosts\yii\framework\web\CController.php(779): CController->renderPartial("contact", array("model" => ContactForm), true)
#4
– E:\xampp\vhosts\yii\blog\protected\controllers\SiteController.php(66): CController->render("contact", array("model" => ContactForm))
61 mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);
62 Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
63 $this->refresh();
64 }
65 }
66 $this->render('contact',array('model'=>$model));
67 }
68
69 /**
70 * Displays the login page
71 */
#5
+ E:\xampp\vhosts\yii\framework\web\actions\CInlineAction.php(50): SiteController->actionContact()
#6
+ E:\xampp\vhosts\yii\framework\web\CController.php(300): CInlineAction->runWithParams(array("r" => "site/contact"))
#7
+ E:\xampp\vhosts\yii\framework\web\CController.php(278): CController->runAction(CInlineAction)
#8
+ E:\xampp\vhosts\yii\framework\web\CController.php(257): CController->runActionWithFilters(CInlineAction, array())
#9
+ E:\xampp\vhosts\yii\framework\web\CWebApplication.php(328): CController->run("contact")
#10
+ E:\xampp\vhosts\yii\framework\web\CWebApplication.php(121): CWebApplication->runController("site/contact")
#11
+ E:\xampp\vhosts\yii\framework\base\CApplication.php(155): CWebApplication->processRequest()
#12
– E:\xampp\vhosts\yii\blog\index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
Kann mir jemand sagen woran es liegen könnte.
Meine Entwicklungsumgebung (XAMPP)
Apache/2.2.14
PHP/5.3.1
alle min requirements sind grün.
Danke für Eure Hilfe im voaus.
Bye