From the documentation on this page:
If you are installing the databases manually, then once you get the database you want to use copy it to Matomo’s path/to/matomo/misc/ subdirectory.
But it doesn't tell you what filename to extract it out as. I tried to read the php but the code is highly obfuscated making it impossible for me to determine what is an acceptable DB name. Extacting the file from the gz gives today, for example,
Ok. Actually it would be expected to have those files working directly.
Will have a quick look why that doesn't work and if we can fix that at least for Matomo 4.
Till then try renaming to
Hmmm. Okay, I think that this was because I didn't have the GeoIP2 plugin enabled. On activating this it found the file, but the legacy pear plugin didn't see it (because it's an mmdb file now rather than the .dat file that I was replacing?)
edit: Actually, you're right, it has to be a specific name, even with the GeoIP2 plugin activate. This should certainly be in the docs if it's not just going to load any mmdb file from the directory.
On the subject of activating plugins via the UI.
I would have thought that the Plugins and PluginsInstalled would be better placed in the DB or something. I'm configuring matomo with puppet and because our production infrastructure is a load balanced trio of servers, and a separate DB, these interface changes get wiped out by puppet because the file has changed. Matomo have made some concessions to this with the
enable_general_settings_admin settings in the config file but I think that you need to think you need to go back to the drawing board on this.
Here's an example of what changes in the config file after a puppet run after activating GeoIP2 via the UI:
Notice: /Stage[main]/Profiles::Matomo::Prerequisites/File[config.ini.php]/content: --- /usr/local/www/matomo/config/config.ini.php 2020-02-28 14:55:47.165356000 +0000 +++ /tmp/puppet-file20200228-70086-1s4ero4 2020-02-28 15:44:12.727449000 +0000 @@ -8,6 +8,9 @@ tables_prefix = "matomo_" adapter = "MYSQLI" +[Tracker] +record_statistics = 1 + [log] log_writers = "file" @@ -15,15 +18,20 @@ disable_merged_assets = 1 [General] -force_ssl = 1 -multi_server_environment = 1 +maintenance_mode = 0 enable_trusted_host_check = 0 -enable_general_settings_admin = 0 proxy_client_headers = "HTTP_X_FORWARDED_FOR" proxy_host_headers = "HTTP_X_FORWARDED_HOST" trusted_hosts = "piwik.domain.com" salt = "" +force_ssl = 1 +enable_load_data_infile = 1 +session_save_handler = dbtable +; These settings prevent inconsistent configuration from happening across servers +multi_server_environment = 1 +enable_general_settings_admin = 0 + [Plugins] Plugins = "CorePluginsAdmin" Plugins = "CoreAdminHome" @@ -34,6 +42,7 @@ Plugins = "CoreVisualizations" Plugins = "Proxy" Plugins = "API" +Plugins = "ExamplePlugin" Plugins = "Widgetize" Plugins = "Transitions" Plugins = "LanguagesManager" @@ -48,11 +57,11 @@ Plugins = "SEO" Plugins = "Events" Plugins = "UserCountry" -Plugins = "GeoIp2" Plugins = "VisitsSummary" Plugins = "VisitFrequency" Plugins = "VisitTime" Plugins = "VisitorInterest" +Plugins = "ExampleAPI" Plugins = "RssWidget" Plugins = "Feedback" Plugins = "Monolog" @@ -85,9 +94,8 @@ Plugins = "UserId" Plugins = "CustomPiwikJs" Plugins = "DBStats" -Plugins = "ExamplePlugin" -Plugins = "ExampleAPI" Plugins = "QueuedTracking" +Plugins = "GeoIp2" [PluginsInstalled] PluginsInstalled = "Login"
Hi @tsteur I think that the documentation needs updating to let us know what to name the files. It seems that not just any .mmdb will work, it has to have a specific name. I just extracted mine to be
DBIP-City.mmdb which just works, but I wouldn't have known this without the reply from @sgiehl
edit: Although I might have got this working if I had known about the GeoIP2 plugin earlier as I did find references in the code to this and some other names