You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
You have two directories A and B each containing the default tileserver.php and a tileset tiles.mbtiles. A/tiles.mbtiles contains different data than B/tiles.mbtiles.
If you request A/tileserver.php?/tiles/7/8/9.pbf and then request B/tileserver.php?/tiles/6/7/8.pbf this second request will sometimes receive data from A/tiles.mbtiles rather than B/tiles.mbtiles.
This appears to be due to persistence within this line from DBConnect that is maintained without regard the tileset's full path: $this->db = new PDO('sqlite:' . $tileset, '', '', array(PDO::ATTR_PERSISTENT => true));
Changing the dataRoot configuration so that the full path for tiles.mbtiles is passed to DBConnect fixes the issue. I would suggest switching the default configuration from $config['dataRoot'] = ''; to $config['dataRoot'] = __DIR__;.
This fixes the issue in my tests on:
Ubuntu + Nginx + PHP7.0-FPM
Ubutnu + Apache + PHP
OSX + PHP
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is the scenario I encountered:
You have two directories
A
andB
each containing the defaulttileserver.php
and a tilesettiles.mbtiles
.A/tiles.mbtiles
contains different data thanB/tiles.mbtiles
.If you request
A/tileserver.php?/tiles/7/8/9.pbf
and then requestB/tileserver.php?/tiles/6/7/8.pbf
this second request will sometimes receive data fromA/tiles.mbtiles
rather thanB/tiles.mbtiles
.This appears to be due to persistence within this line from
DBConnect
that is maintained without regard the tileset's full path:$this->db = new PDO('sqlite:' . $tileset, '', '', array(PDO::ATTR_PERSISTENT => true));
Changing the
dataRoot
configuration so that the full path fortiles.mbtiles
is passed toDBConnect
fixes the issue. I would suggest switching the default configuration from$config['dataRoot'] = '';
to$config['dataRoot'] = __DIR__;
.This fixes the issue in my tests on:
Ubuntu + Nginx + PHP7.0-FPM
Ubutnu + Apache + PHP
OSX + PHP
The text was updated successfully, but these errors were encountered: