Class 'CTheme' not found


I developed an application with Yii that works correctly in my development pc. But when i copy it to the server in some sections of the app it throws a Fatal error:

Fatal error: Class ‘CTheme’ not found in /home/blabla/public_html/yii-1.1.7.r3135/framework/web/CThemeManager.php on line 31

any help on how to solve it is appreciated.


Is it a problem with case insensitive vs case sensitive operating systems.

I hate developing on windows for that very reason, server is linux, dev machine is Vista, it drives me nuts every time I deploy a new site.

Also it seems unusual that you have your framework installed in the public_html folder, a typical install for me puts the framework in a folder above public_html.

Soon soon soon (soon) I will be getting a mac…soon.


Hello; im using linux in my pc, and the server is also a unix system, so, i think the problem is of another kind.

I dont know what triggers the error, because the application works perfectly in many sections. These also use Yii::app()->getTheme(), so, Yii autoload and path configuration works fine.

… and the framework is hidden with a htaccess…

Thanks for the reply

This seems to be a bit strange

There’s no code referring to CTheme at that line so some lines may be missing. Upload the framework again and see if it makes any difference.


Contradicted by this, though

Perhaps some server caching related problem?


What about php versions?

I know there are a lot of differences in 5.3 that can bite you if you develop on 5.3 and then deploy on 5.1 - 5.2.


Well… it works now!

Really, the problem was not related with server settings or Yii themes…

Here i have PHP 5.3.3, and in the server, 5.2.15.

In my code, i was autoloading a class and calling a static function… something like this:

$className = 'Post';


This simple thing throws the fatal error everywhere… and the error message dont tells where the problem is really.

and… thanks again

good to hear that you got it sorted out.