Studio-42/elFinder — Issue #203: realpath() on creates issues on Windows
Author: rivulent
Created: 2012-02-12 23:20:10+00:00
State: open

We experienced this with the MySQL Driver. I do not know if it will create problems using other drivers.

When using elFinder on Windows, realpath() will produce something like this: C:\Windows\Temp\m1_abc.tmb

Notice that unlike a *NIX environment where paths use forward slashes, on Windows the paths use a single backlash.

The problem is that single-backslashes are generally escape characters. So, when the MySQL driver attempts a LOAD_FILE on the value of realpath(), LOAD_FILE simply returns null.

On Windows, the single backslashes from realpath() must be replaced with either a double backslash ("\\") or a forward slash.

I suggest updating elFinder or at least the MySQL driver to detect & handle the difference between Windows & *NIX environment.

Thanks.