-
Notifications
You must be signed in to change notification settings - Fork 34
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
Symlinks issue #17
Comments
Are you sure it breaks the "normal" paths? I just tried it on my Mac here and with your fix it actually handles both cases without problems (with or without symlink). Which link breaks? Also, thanks for this :-) |
I replaced my code with yours. I tried to reproduced the problems you mention, but I couldn't. I tried using a symlink to 'tileserver.php' from a regular folder, and that worked, and I tried symlinking the whole folder, and that worked as well. I could even symlink a folder that contained a symlink to the tileserver.php, all without issues. What does your directory structure look like, and when/how does it break? |
Hello, is not working for me (I can send you a private link if needed) because Actually my solution was to remove this function from here. I'm actually using (successfully) in my different locations:
|
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 torealpath()
.Of course this dirty workaround fixes the issue on paths containing symlink, but breaks the program on "normal" paths...
The text was updated successfully, but these errors were encountered: