@kevin-shelaga opened this Issue on June 27th 2021

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.

Expected Behavior

Should show as selectable and installed

Current Behavior

Not selectable and not installed

Possible Solution


Steps to Reproduce (for Bugs)



Matomo 4.3.1

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@diosmosis commented on June 27th 2021 Member

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.

@kevin-shelaga commented on June 27th 2021

@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
@diosmosis commented on June 27th 2021 Member

@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.

@kevin-shelaga commented on June 28th 2021

@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?

@diosmosis commented on June 28th 2021 Member

@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 commented on June 28th 2021

@diosmosis Does the user require root access?

@diosmosis commented on June 28th 2021 Member

@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?

@kevin-shelaga commented on June 28th 2021

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

@kevin-shelaga commented on June 28th 2021

@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.

@diosmosis commented on June 28th 2021 Member

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?).

@kevin-shelaga commented on June 28th 2021

Yes, it is the bitnami docker image. But it's pretty basic, standard configuration.

@oktak commented on December 23rd 2021

[FYI] I use bitnami's matomo docker image too. My case is the UI download seems not work for me (I deployed the docker image on Oracle Cloud, perhaps some network issues I didn't solved).

I inspected the running docker container, the DBIP-City.mmdb file should be placed in /opt/bitnami/matomo/misc folder inside the docker container. This path /opt/bitnami/matomo is the place that those .php files locate.

Meanwhile, their example docker-compose.yaml is mounting like matomo_data:/bitnami/matomo where the config/config.ini.php is locating at.

My screenshot:
Screenshot from 2021-12-23 09-10-27

This Issue was closed on June 28th 2021
Powered by GitHub Issue Mirror