Skip to content

Symlinks issue #17

@jbogdani

Description

@jbogdani

Hello I'm having issues using mbtiles-php inside a symlinked folder.
The main issue is related to line 607:
$here = str_replace("\\", "/", realpath(rtrim(dirname(__FILE__), '/')) . "/");

FILE resolves symlinks and so does realpath. This prevent the route to be resolved...

I actually solved changing this line to:

$here = str_replace("\\", "/", rtrim(dirname($_SERVER["SCRIPT_FILENAME"]), '/') . "/");

ie. replacing __FILE__ with $_SERVER["SCRIPT_FILENAME"] and removing any reference to realpath().

Of course this dirty workaround fixes the issue on paths containing symlink, but breaks the program on "normal" paths...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions