Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

symbolic links #77

Open
jgpATs2w opened this issue Feb 19, 2015 · 1 comment · May be fixed by #136
Open

symbolic links #77

jgpATs2w opened this issue Feb 19, 2015 · 1 comment · May be fixed by #136

Comments

@jgpATs2w
Copy link

this issue is the continuation of #30

Scenario

  • PHP's DOCUMENT_ROOT ( i.e. /var/www ) is a symbolic link to other folder ( i.e. /other/www )
  • I don't have permissions to change PHP's or directories on the server, so I have to deal with the symbolic links.

Description

In uploader->checkFilePath realpath resolves the symbolic link to its linked folder and returns false, producing an 'Unknow error'.

Solution

Changing the initial declaration of $this->typeDir on the uploader's constructor, to set the 'real path' does the trick for me.
In my code I've changed lines 224, 232 and 243 of core/class/uploader.php
from
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
to
$this->typeDir = realpath("{$this->config['uploadDir']}/{$this->type}");

It's working, but could this have any undesired effect??

@lfglopes
Copy link

Same issue over here. Thanks for the workaround. If problems arise i'll let you know :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants