enable trace in Module


I just set up (for the first time) an Admin Module. And I would like to play with trace inside controller of this Admin Module.

But I can’t.

I just set


inside the AdminModule.php file (in init())

Where as, trace are working well in the rest of my webApp…

I have a PHP error saying that include(Yii) failed to open stream: No such file or directory

Source File : YiiBase.php (395)

Do you know why ?


This is the message :

PHP Error


include(Yii.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

Source File


00383:      * @return boolean whether the class has been loaded successfully

00384:      */

00385:     public static function autoload($className)

00386:     {

00387:         // use include so that the error PHP file may appear

00388:         if(isset(self::$_coreClasses[$className]))

00389:             include(YII_PATH.self::$_coreClasses[$className]);

00390:         else if(isset(self::$classMap[$className]))

00391:             include(self::$classMap[$className]);

00392:         else

00393:         {

00394:             if(strpos($className,'\\')===false)

00395:                 include($className.'.php');

00396:             else  // class name with namespace in PHP 5.3

00397:             {

00398:                 $namespace=str_replace('\\','.',ltrim($className,'\\'));

00399:                 if(($path=self::getPathOfAlias($namespace))!==false)

00400:                     include($path.'.php');

00401:                 else

00402:                     return false;

00403:             }

00404:             return class_exists($className,false) || interface_exists($className,false);

00405:         }

00406:         return true;

00407:     }

Stack Trace

#0 D:\wamp\www\yii\framework\YiiBase.php(395): autoload()

#1 unknown(0): autoload()

#2 D:\wamp\www\sebastian\protected\modules\admin\AdminModule.php(16): spl_autoload_call()

#3 D:\wamp\www\yii\framework\base\CModule.php(73): AdminModule->init()

#4 D:\wamp\www\yii\framework\YiiBase.php(200): AdminModule->__construct()

#5 D:\wamp\www\yii\framework\base\CModule.php(266): createComponent()

#6 D:\wamp\www\yii\framework\web\CWebApplication.php(379): CWebApplication->getModule()

#7 D:\wamp\www\yii\framework\web\CWebApplication.php(318): CWebApplication->createController()

#8 D:\wamp\www\yii\framework\web\CWebApplication.php(121): CWebApplication->runController()

#9 D:\wamp\www\yii\framework\base\CApplication.php(135): CWebApplication->processRequest()

#10 D:\wamp\www\sebastian\index.php(13): CWebApplication->run()

OK, Sorry.

Nothing to configure more than for the non admin part (regarding debug and trace)

I had an error due to invalid character (Y in Chinese) …=> Yii file not recognized

Nice bug… :D

Very difficult to notice the difference…