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??
this issue is the continuation of https://github.com/sunhater/kcfinder/issues/30
Scenario
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??