Yii Error: include(Controller.php): failed to open stream: No such file or directory

i have problem in using Yii 1.1 after generate the webapp using yiic. all controllers failed to loaded. After looking around the quick way to solve it is just add Yii::$enableIncludePath = false; in the index.php on the site root below the require_once($yii); statement. so the index.php should look like:

<?php
/**
* This is the bootstrap file for test application.
* This file should be removed when the application is deployed for production.
*/
// change the following paths if necessary
$yii = dirname(__FILE__) . '/../framework14/yii.php';
$config = dirname(__FILE__) . '/protected/config/test.php';

// remove the following line when in production mode
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, false);

require_once($yii);
Yii::$enableIncludePath = false;

Yii::createWebApplication($config)->run();

Leave a comment