[SOLVED] Fatal error: Class 'CErrorEvent'

Hello, dear colleagues. Please, help me solve one little problem.

I’m trying to set up local version of working website with yii 1.0.9 on Ubuntu 10.10. I’ve already made some minor fixes and it works, but main functionality of searching rates doesn’t work. And i get error:




( ! ) Fatal error: Class 'CErrorEvent' not found in /home/bazzy/htdocs/testsite/protected/controllers/OrdersController.php on line 885

Call Stack

#    Time    Memory    Function    Location

1    0.0002    333812    {main}( )    ../index.php:0

2    0.0090    1549172    CApplication->run( )    ../index.php:17

3    0.0090    1549172    CWebApplication->processRequest( )    ../CApplication.php:135

4    0.0106    1712128    CWebApplication->runController( )    ../CWebApplication.php:120

5    0.0106    1712128    CWebApplication->createController( )    ../CWebApplication.php:326

6    0.0127    2058204    CApplication->handleError( )    ../CApplication.php:0



This application works perfectly on hosting, and in Windows with XAMPP server i have working local copy. But in Ubuntu this crap happens. What should i make?

Thanks "Ciss" from Freenode #yii channel for solving problem.

Solution was in adding two import strings to config.php:


Yii::import('system.base.CErrorEvent', true);

Yii::import('system.web.helpers.CHtml', true); 

After this i’ve got possibility to see normal yii error page with error: “Call-time pass-by-reference has been deprecated”. And this error was fixed by changing allow_call_time_pass_reference directive in php.ini.

So, problem has gone.

So, now i can’t understand, why my apache wasn’t able to get this CErrorEvent and CHtml by himself? I was setting my yii framework folder’s permissions to 777 and it still haven’t seen that classes. Is it Ubuntu “feature”?

I think this issue is related to caching, I had this happen to 2-3 Yii classes over the course of a few weeks.

I updated Yii a few times and for the most part it seems to have gone away on it’s own. I wish I had time to investigate the symptoms a little more.