maptiler/tileserver-php

Cannot get past "welcome"

Closed this issue · 1 comments

I'm following the documentation at openmaptiles.org/docs/host/tileserver-php with what should be minor differences: I'm running FreeBSD 10.3, not Linux, and have PHP 7.0.18 installed, not v5.

My goal is a self-contained server that serves vector tiles from local storage. At the moment I'm just trying to get it working, no matter what problems there might be with performance or styling because I can fix those later.

But I'm not getting past the "Welcome", and am beginning to wonder whether I'm trying to integrate the wrong parts. There is a call to a js routine "tileserver()" that doesn't seem to be defined anywhere.

Already having a functional FAMP setup with docroot declared as /S/docroot, I've...

  • downloaded the US.mbtiles file from openmaptiles, storing it in /S/dataroot, i.e. outside the docroot subtree.
  • downloaded the tileserver-php zip file and unpacked it, storing .htaccess into /S/dataroot, and tileserver.php into /S/docroot/mapsvr.
  • edited tileserver.php to point "dataroot" at "/S/dataroot/"
  • downloaded mapbox-gl.css, renamed it map.css, and stored it in /S/docroot/mapsvr
  • downloaded mapbox-gl.js and stored it in /S/docroot/mapsvr
  • edited tileserver.php to include pointers to the js and css files
  • modified httpd.conf to load mod_rewrite, and restarted the daemon
  • called tileserver.php from Firefox. Got the "Welcome", and a 1-item bulleted list stating that "OpenMapTiles" is recognised. It never gets any further, presumably because it can't find tileserver()

Am I trying to glue together incompatible parts?

It is tested on PHP 7. You can not set data root just use the root of tileserver-php. It is easier. And try to first time run only tileserver-php without adding a mapbox js. Tileserver includes javascript viewer with js code examples.