Skip to content

Error fail to open stream #2

nielskramer opened this Issue Jan 3, 2013 · 6 comments

3 participants



Your extion looks great. But when i attempt to use it I get a error on the autoload function in YiiBase.

include(EMenu.php): failed to open stream: No such file or directory

The steps i followed to install the widget are the ones listed on your site :

Download archive with extension
Uncompress menu extension to folder protected/extensions
Create item array
Use widget code

Is there anything obvious i am forgetting or doing wrong ? Because i haven't been using Yii for a long time.



@belichuk belichuk was assigned Jan 3, 2013
belichuk commented Jan 3, 2013

I think the problem is that the extension was downloaded from github. Оriginal name is different from the name of a github. Please open your protected/extensions folder and find folder "menu-master" and rename this folder to "menu". Than you can use $this->widget('', array('items' => $items));


The folder is already named menu.
This is the current path : protected/extensions/menu
In that folder i placed the EMenu.php.
And it contains a assets folder with all the CSS and JS files.

belichuk commented Jan 3, 2013

This problem with autoload.
Try do next step:
1. Open for edit config file and add element '*' to import array.
2. In view file plase next code: <?php $this->widget('EMenu', array('items' => $items)); ?>

@belichuk belichuk closed this Jan 3, 2013
@belichuk belichuk reopened this Jan 3, 2013

Thanks for you help but this also didnt solve the problem.
I do have a different error message now though,:
Fatal error: Class 'EMenu' not found in C:\Users\Niels\SkyDrive\www\Yiiroot\framework\web\CWidgetFactory.php on line 148


After a couple of days i finally found the problem. In EMenu.php the file was started with <? instead of <?php.
Might be usefull for other people with the same problem.

Thanks and greetings,,


@belichuk belichuk pushed a commit that closed this issue Jan 11, 2013
Nikolay I. Belichuk fixed #2 af4302a
@belichuk belichuk closed this in af4302a Jan 11, 2013

yeah its quite annoying not being able to use the thing in the first place because of a simple thing like that, thanks to the author but please do update your widget not to use short tags coz not many people use those, its actually bad coding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.