problem import php file

I’ve a strange problem:

/protected/components/Constants.php (is a class Constants)


/Constants.php (isn’t a class and it contain only variable definition and it’s never included on my protected code, only on 1 file /test.php never used)

on /protected/config/main.php

‘import’ => array(






and Yii report this error:

Fatal error: Undefined class constant ‘Constants::T_TUMOR’ in /path/protected/lib/yii/framework/web/CWebApplication.php on line 401

I tried to change /Constants.php to /Constants2.php and my webapp works fine, but on production I can’t change its name.

Why yii import this file?

The error mesage seems to refer to the instantiation of a controller. The controller probably are dependent on the class Constants. You may try to explicitly include the expected .../protected/components/Constants.php in the class for that controller.