After downloading/extracting/renaming DBIP-City.mmdb to the misc directory the DBIP GeoIP 2 (php) doe not show as installed. I can see the current location gets updated from USA to Canada, which is correct, so I assume the file is being detected.
Should show as selectable and installed
Not selectable and not installed
Hi @kevin-shelaga, thanks for the report! I can reproduce this locally. When I change the name of my database to DBIP-City.mmdb, the location provider is suddenly unavailable.
Note: you could workaround this by changing the name of the file to
GeoLite2-City.mmdb. It shouldn't affect the result of geolocation just get Matomo to recognize it's existence.
@diosmosis I couldnt get the work around to work. I have renamed the file but still geolocation does not show as installed.
/matomo/misc$ ls -l total 96664 -rw-r--r-- Jun 27 12:35 GeoLite2-City.mmdb drwxrwxr-x Jun 27 11:58 user
@kevin-shelaga actually it seems I made a mistake when testing, looking again it's working for me. Can you check if the user your webserver runs as can see the file? Eg, checking if
<?php echo file_exists('/matomo/misc/GeoLite2-City.mmdb'); works when run in a web request.
@diosmosis The file exists but it's at /etc/bitnami/matomo/misc/
I wonder if that's the issue, matomo isn't expecting the bitnami subdirectory?
@kevin-shelaga it shouldn't be, I just didn't know where the root directory for matomo was so I put the same path you put. Everything will be relative to the matomo root directory.
@kevin-shelaga the user that whatever is running the matomo PHP scripts (eg, php-fpm or apache or something else) needs to have access to the file in the misc directory. I'm assuming you added it there yourself and didn't use the UI downloader in the admin settings, correct?
The UI download worked though I'm still not sure why I can't get the file I downloaded to work as the user (1001) does own the file.
Thank you for all your help @diosmosis
@diosmosis I just wanted to let you know that the UI stuck the mmdb file under /misc/user and not under /misc, so im guessing this is why the file i added was not being registered.
That's interesting, it works for me in the /misc directory. I guess there are some configuration differences between my local setup and however you're deploying (I'm guessing docker?).
Yes, it is the bitnami docker image. But it's pretty basic, standard configuration.