Navigation Menu

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

open_basedir restriction AND Support multiple plugin paths #14226

Closed
prolibre opened this issue Mar 19, 2019 · 8 comments · Fixed by #14228
Closed

open_basedir restriction AND Support multiple plugin paths #14226

prolibre opened this issue Mar 19, 2019 · 8 comments · Fixed by #14228
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@prolibre
Copy link

I have an error since the last update (3.9.0)

WARNING: /INSTALL_DIR/core/Plugin/Manager.php(451): Warning - is_dir(): open_basedir restriction in effect. File(/INSTALL_DIRplugins/Annotations) is not within the allowed path(s): (/INSTALL_DIR/) - Matomo 3.9.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)

Because there's a mistake in the path : /INSTALL_DIRplugins/Annotations (it's missing one /)

$corePluginsDir = PIWIK_INCLUDE_PATH . 'plugins/' . $pluginName;
should perhaps be replaced by:
$corePluginsDir = PIWIK_INCLUDE_PATH . '/plugins/' . $pluginName;

Thank you for your work / Merci beaucoup

Anthony

@conrad784
Copy link

I can confirm this bug, this is an issue with my installation too.

@mattab
Copy link
Member

mattab commented Mar 19, 2019

Thanks for the report @prolibre
@conrad784 just to confirm, do you mean that the patch here solves the bug for you?

@prolibre
Copy link
Author

prolibre commented Mar 19, 2019

Hello @mattab

core/Plugin/Manager.php(450)
- $corePluginsDir = PIWIK_INCLUDE_PATH . 'plugins/' . $pluginName;
+ $corePluginsDir = PIWIK_INCLUDE_PATH . '/plugins/' . $pluginName;

works for me yes

@Findus23
Copy link
Member

Comparing it with other places in https://github.com/matomo-org/matomo/search?q=PIWIK_INCLUDE_PATH&unscoped_q=PIWIK_INCLUDE_PATH it makes sense as they also have a leading /

@conrad784
Copy link

@mattab changing

- $corePluginsDir = PIWIK_INCLUDE_PATH . 'plugins/' . $pluginName;
+ $corePluginsDir = PIWIK_INCLUDE_PATH . '/plugins/' . $pluginName;

in 'core/Plugin/Manager.php' works for me

the update gave me the same error message as reported in #14227

@sgiehl
Copy link
Member

sgiehl commented Mar 19, 2019

the / is missing indeed. Otherwise the if always returns false (if open_basedir is not a problem). I'll create a PR for it

@sgiehl sgiehl self-assigned this Mar 19, 2019
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Mar 19, 2019
@RedJohn14
Copy link

I have the same problem here.

`- $corePluginsDir = PIWIK_INCLUDE_PATH . 'plugins/' . $pluginName;

  • $corePluginsDir = PIWIK_INCLUDE_PATH . '/plugins/' . $pluginName;`

will it fixed in next version?

@sgiehl
Copy link
Member

sgiehl commented Mar 20, 2019

@RedJohn14 yes. it will be fixed

@sgiehl sgiehl modified the milestones: 3.10.0, 3.9.1 Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants