[Help] Fatal error: Class 'Controller' not found on PHP 7

I have existing Yii 1 project run on PHP 5.5.x and want to test on PHP 7.0.4 but have error “Fatal error: Class ‘Controller’ not found…”.

I try add Yii::import(‘applications.components.*’); still error.

I use Ubuntu server and Yii 1.1.17

any one have same issue? and how to solve this error?

regards

I have a custom class Controller extended from CController and I get the same error, after a while I notice my mistake,

I called beforeAction() without the parameter $action, in php5.5.x I don’t get any error but in php7 I get a fatal error like you, so I write the method as it should be beforeAction($action) and it seems is working now.

Regards.

thanks you for your reply. we have same issue, but different mistake. LOL