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

Media becomes inaccessible when savedir is relative #11

Open
pv2b opened this issue Oct 15, 2019 · 0 comments

Comments

@pv2b
Copy link
Contributor

@pv2b pv2b commented Oct 15, 2019

The savedir parameter of dokuwiki is by default set to ./data. If you run Dokuwiki with this kind of configuration, when using the dokuwiki-saml plugin, the media breaks (i.e. pictures stop loading). Also, the media manager becomes unaccessible, because it thinks an admin is no longer an admin.

saml_user_file is set here using $conf['savedir']

$this->saml_user_file = $conf['savedir'] . '/users.saml.php';

saml_user_file is later referenced in different places, such as here:

if(!@file_exists($this->saml_user_file))
return;
$lines = file($this->saml_user_file);

However! Depending on where exactly where the code is called from, the current working directory can be different, resulting in that sometimes, when you use a relative path like this, it tries to look at the wrong path. This is true when trying to use media manager.

Workaround: Made sure that $conf['savedir'] is configured as an absolute path, i.e. /var/www/dokuwiki/data in my install. (This is what I've done in my install, rather than try to fix this bug.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.