Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something broken on plugins page #730

Closed
davidmead opened this issue Jan 23, 2015 · 6 comments
Closed

Something broken on plugins page #730

davidmead opened this issue Jan 23, 2015 · 6 comments

Comments

@davidmead
Copy link

I just pulled down the latest from GitHub and now have a load of errors when I visit the plugins page.

Warning: file_exists(): open_basedir restriction in effect. File(/nfs/c03/h06/mnt/00000/domains/blog.davidjohnmead.com/html/IdnoPlugins/APITester/Main.php/plugin.ini) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c03/h06/mnt/56448/domains/blog.davidjohnmead.com/html/Idno/Core/Plugins.php on line 132

I get this repeated 2-4 times for each plugin.

Any ideas?

@mapkyca
Copy link
Member

mapkyca commented Jan 23, 2015

Guessing...

Your open_basedir restriction is stopping plugins from opening the plugins.ini file.

Now why this is I'm not sure, but I'm guessing that it's because your domain looks like it's mounted from on your nfs export, and I'm wondering whether file_exists is complaining because you're crossing a mount.

Maybe. :)

@benwerd
Copy link
Member

benwerd commented Jan 23, 2015

I think this is a shared host, right?

For some reason the plugins path isn't allowed to be opened by PHP. I'm not sure why that error would have just appeared though - if I'm reading it right, it's something that would have been there for a while.

It's possible that Known is picking up the wrong path for some reason, but from the error, it looks like the paths you can open are heavily restricted. I'd drop a line to your server admin.

@davidmead
Copy link
Author

Hmmm.

I had open_basedir issues when editing/posting, but that seems to have not been happening too much recently #629. I never had this issue with the plugins before (I think) :-(

Looking at line 132 didn't shed any light. compared to the backup of the file I had on 2015/01/19.

@davidmead
Copy link
Author

Thanks for the ideas @mapkyca & @benwerd.

So I edited the php.ini in the Media Temple panel. Each time I did I saw the changes reflected in the part of the warning below, but it did nothing else.

(/nfs:/tmp:/usr/local:/etc/apache2/gs-bin)

Also added path = '/home/00000/domains/blog.davidjohnmead.com/html' to the config.ini in IDNO, but that didn't do anything either.

Commented out both changes to php.ini & config.ini.

Added error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_WARNING to php.ini and now warnings no longer appear.

It seems, looking at line 132 of plugins.php, it thinks there are subfolders where there shouldn't be (this is my noob layman's POV).

if ($subfolder != '.' && $subfolder != '..') { if (file_exists(\Idno\Core\site()->config()->path . '/IdnoPlugins/' . $folder . '/' . $subfolder . '/plugin.ini'))

relates to...

File(/nfs/c03/h06/mnt/00000/domains/blog.davidjohnmead.com/html/IdnoPlugins/APITester/Main.php/plugin.ini)

so is it thinking that /Main.php is a folder that plugin.ini is situated? Both Main.php & plugin.ini are in the APITester folder.

benwerd added a commit that referenced this issue Jan 27, 2015
@benwerd
Copy link
Member

benwerd commented Jan 27, 2015

You're absolutely right. I've just removed that portion of the code; we could do an is_dir check to make sure the folder is a directory (which should have been in the original code to prevent the situation you came across), but it's not a heinous thing to require plugins to be on one directory level.

@davidmead
Copy link
Author

Great. I'll get that next time I pull down and push to my site.

@benwerd benwerd closed this as completed May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants