zii Widget issue

I get this error when adding a zii widget:

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

stack trace:

/yii-1.1-dev/framework/YiiBase.php(338): autoload()

unknown(0): autoload()

/yii-1.1-dev/framework/YiiBase.php(257): spl_autoload_call()

/yii-1.1-dev/framework/YiiBase.php(257): import()

/yii-1.1-dev/framework/web/CBaseController.php(143): import()

/yii-1.1-dev/framework/web/CBaseController.php(173): SiteController->createWidget()

/themes/default/views/site/pages/about.php(31): SiteController->widget()

/yii-1.1-dev/framework/web/CBaseController.php(119): require()

/yii-1.1-dev/framework/web/CBaseController.php(88): SiteController->renderInternal()

/yii-1.1-dev/framework/web/CController.php(742): SiteController->renderFile()

/yii-1.1-dev/framework/web/CController.php(681): SiteController->renderPartial()

/yii-1.1-dev/framework/web/actions/CViewAction.php(138): SiteController->render()

/yii-1.1-dev/framework/web/CController.php(300): CViewAction->run()

/yii-1.1-dev/framework/web/CController.php(278): SiteController->runAction()

/yii-1.1-dev/framework/web/CController.php(257): SiteController->runActionWithFilters()

/yii-1.1-dev/framework/web/CWebApplication.php(320): SiteController->run()

/yii-1.1-dev/framework/web/CWebApplication.php(120): CWebApplication->runController()

/yii-1.1-dev/framework/base/CApplication.php(135): CWebApplication->processRequest()

/index.php(11): CWebApplication->run()

here is the code:


$this->widget('zii.widgets.jui.CJuiAccordion', array(


        'panel 1'=>'content for panel 1',

        'panel 2'=>'content for panel 2',


    // additional javascript options for the accordion plugin






I don’t really know why you would have to do this, but maybe in your config try -


                ....your other imports....



this is how i solved it, but i hope that there is more of a permanent solution haha

This is still randomly happening. Has anyone else dealt with this issue?

This is getting incredibly annoying, now I have to do this for the following classes:





Having almost the same problem here, but with Portlets. I’m using


and sometimes it gives me an error "failed to open stream: No such file or directory" (CPortlet.php). I can solve this by editing my widget/portlet file (add a space and save the file), but after editing some other files the error mentioned above appears again.

Is there any update on this? I’m still randomly getting error 500:

"include(CPortlet.php) [function.include]: failed to open stream: No such file or directory"

I didn’t make any changes to the code for a while and everything was fine untill today I got emails from my users telling me about this error. I just resaved the file (the component which imports CPortlet) and everything works fine.

Here is my component:



    class Reviewed extends CPortlet {

        public $title='<h3>Title</h3>';

        public function getid() {

            return $this->id = 'widget-reviewed';


        public $htmlOptions=array('class'=>'sidebar-widget');

        public $titleCssClass='widget-title';

        public $contentCssClass='widget-content';

        public $decorationCssClass='widget-title-wrapper';

        public function getReviewed() {

            $criteria = new CDbCriteria;


            return MyModel::model()->findAll($criteria);


        protected function renderContent() {




Am I doing something wrong?

Thank you!

Do you use an opcode cache (APC)? If so, which version is it and can you try with cache disabled? I mean not in Yii configuration but fully disable in php.ini.

Yes, I do. The version of APC I use is 3.0.19. I can try to disable cache, but I don’t know when the error will show up the next time (maybe a week or a month). Anyway I’d like to get this working with APC enabled if possible =)

I remember similar issues with APC in PRADO (the Yii predecessor). We couldn’t really find a solution but the problem seemed to disappear with APC 3.1.2.

Mike, thanks for the info! I’ll try to upgrade APC then.

Hello people,

I am also having this problem on Apache 2.2, PHP 5.2.10, Ubuntu, APC 3.0.19.

Can you confirm that the problem is gone with APC 3.1.2?


To let you know, I’ve just got this problem this morning using CGridView with ajax update.

It is complaining it cannot include CBaseListView even if APC is disabled (APC 3.0.19).

It is happening only with ajax requests.