VladimirKalachikhin / Galadriel-cache

Simple map tile cache / proxy
Other
7 stars 1 forks source link

Apache2 Errors #6

Open mrbc42 opened 2 days ago

mrbc42 commented 2 days ago

Hi Vladimir, have installed GC on a PI with OpenPlotter and Galadriel Maps. Online works fine but streams of error messages in the Apache logs. When I go offline to use the cache, maps are only loading sometimes and also lots of errors. Same errors with different maps.

see below. Please help, thanks.

[Fri Oct 11 15:56:44.352591 2024] [php7:notice] [pid 41836:tid 41836] [client 10.42.0.48:41600] PHP Notice:  Undefined variable: ContentType in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
[Fri Oct 11 15:56:44.352694 2024] [php7:notice] [pid 41836:tid 41836] [client 10.42.0.48:41600] PHP Notice:  Undefined variable: content_encoding in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
PHP Notice:  Only variables should be passed by reference in /GaladrielMap/tileproxy/tilefromsource.php on line 272
PHP Notice:  Undefined index: checkonly in /GaladrielMap/tileproxy/tilefromsource.php on line 381
tilefromsource.php getTile 1's try: Saved 2159 bytes to ./tiles/OpenTopoMap/11/1897/1170.png from https://b.tile.opentopomap.org/11/1897/1170.png
[Fri Oct 11 15:56:45.014258 2024] [php7:notice] [pid 41242:tid 41242] [client 10.42.0.48:41632] PHP Notice:  Undefined variable: ContentType in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
[Fri Oct 11 15:56:45.014337 2024] [php7:notice] [pid 41242:tid 41242] [client 10.42.0.48:41632] PHP Notice:  Undefined variable: content_encoding in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
PHP Notice:  Only variables should be passed by reference in /GaladrielMap/tileproxy/tilefromsource.php on line 272
PHP Notice:  Undefined index: checkonly in /GaladrielMap/tileproxy/tilefromsource.php on line 381
tilefromsource.php getTile 1's try: Saved 103 bytes to ./tiles/OpenTopoMap/11/1897/1174.png from https://a.tile.opentopomap.org/11/1897/1174.png
PHP Notice:  Only variables should be passed by reference in /GaladrielMap/tileproxy/tilefromsource.php on line 272
PHP Notice:  Undefined index: checkonly in /GaladrielMap/tileproxy/tilefromsource.php on line 381
tilefromsource.php getTile 1's try: Saved 41759 bytes to ./tiles/OpenTopoMap/11/1890/1170.png from https://a.tile.opentopomap.org/11/1890/1170.png
[Fri Oct 11 15:56:45.258932 2024] [php7:notice] [pid 41669:tid 41669] [client 10.42.0.48:41646] PHP Notice:  Undefined variable: ContentType in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
[Fri Oct 11 15:56:45.259038 2024] [php7:notice] [pid 41669:tid 41669] [client 10.42.0.48:41646] PHP Notice:  Undefined variable: content_encoding in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
[Fri Oct 11 15:56:45.260522 2024] [php7:notice] [pid 41899:tid 41899] [client 10.42.0.48:41618] PHP Notice:  Undefined variable: ContentType in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
[Fri Oct 11 15:56:45.260599 2024] [php7:notice] [pid 41899:tid 41899] [client 10.42.0.48:41618] PHP Notice:  Undefined variable: content_encoding in /GaladrielMap/tileproxy/tiles.php on line 152, referer: http://10.42.0.1:3000/
PHP Notice:  Only variables should be passed by reference in /GaladrielMap/tileproxy/tilefromsource.php on line 272
PHP Notice:  Undefined index: checkonly in /GaladrielMap/tileproxy/tilefromsource.php on line 381
tilefromsource.php getTile 1's try: Saved 44976 bytes to ./tiles/OpenTopoMap/11/1890/1174.png from https://c.tile.opentopomap.org/11/1890/1174.png
VladimirKalachikhin commented 2 days ago

PHP Notice is not a error. They specify a good style. But I have my own style. You can disable the Notice messages by set error_reporting = E_ALL & ~E_STRICT & ~E_NOTICE in the ; Error handling and logging ; section of the php.ini

tilefromsource.php gets tile from Internet, not from cache, so it is ok if it is not called all the time.

mrbc42 commented 2 days ago

ok thanks, any way to enable the map download tool in the signalK version of GC & GM? The cached maps sometimes dont load when offline so maybe the tool will help? gm

VladimirKalachikhin commented 2 days ago

If the map is in the cache, it should be visible offline. From your picture I would say that the required tiles are not in the cache. If you think they should be -- switch zoom to - and then to +. If the tiles are in the cache, they will appear immediately. If not, they will be downloaded, and you will see a pause. You have to make sure that once downloaded from the internet, the tiles are actually saved (or not) in the cache. For various reasons, the tile loading process can be lengthy, and the browser may not wait for it to complete.

The user-frendly download tool is present in original GaladrielMap version only. Not in the SignalK edition. The reason for this is the architecture of the SignalK and the implementation of the existing charts-plugin. Sorry. The easiest way is use the original GaladrielMap for download. But you can also do it by hands, as described in section Loader of the documentation. But there is no simple way to create a job file. Sorry again.

mrbc42 commented 2 days ago

Thanks Vladimir, I understand and appreciate the response.