After migration: Problems with URLs and GeoIP


#1

Hi there,

i am running several small sites and try now to have them tracked in one ‘neutral’ Piwik DB, eg a distinct domain different from any site’s domain. As only one site has a logging history that should not get lost, i moved this sites single Piwik DB to the new location (via table export/import) and copied the /piwik/ folder to the new location with Filezilla (passive mode). Several German blog posts recommended this way of transfering old data. Then I added two new sites to the new Piwik DB.

Works like a charm, except for two problems:

(1) The GeoIP/UserCountry Plugin does not work anymore. If activated, no tracking takes place on any of my sites, and calling the Geolocation menu item produces the following error:


Uninitialized string offset: 0 in /www/htdocs/xxxxxyyyyy/piwik/libs/MaxMindGeoIP/geoip.inc on line 627

I checked the forum, there used to be a similar problem around the 1.10.1 release. I’m running on 1.12, although the old DB has started in January 2013 (so propably as a 1.10.x). I downloaded a fresh piwik zip and replaced the /plugins/UserCountry folder manually, but no change. Is there any other fix I can try to use?

(2) URL calls to the login page are not working the way they used to, and should, propably. On logout and from the WP Piwik shortcut, I am directed to


http://xxxxyyyy.net/piwik/index.php?module=CoreHome&action=index&idSite=1&period=range&date=last7

instead of just http://xxxxyyyy.net/piwik. This produces the following error:

The requested website idSite is not found in the request, or is invalid. Please check that you are logged in Piwik and have permission to access the specified website.

which is strange as the id is correct. I have blocked anonymous access, though: If i turn it on, I get redirected to the stats, no problem. This happens accross browsers, so no cookie/temp files/cache issue, i guess. Also putting login_logout_url into the config.ini.php (as mentioned in another thread) did not help.

Any hints? I would use a clean install of everything if only i would not loose the piwik data from this one site… Glad for any help, pano


(Matthieu Aubry) #2

You will never lose data from piwik when reinstalling

Your problem I cannot explain. Maybe try disable Geo location in Settings>Geo Location ?


#3

Matt, thanks for looking into this. The Settings page I cannot reach, it is blocked with the error mentioned above. So do you suggest I unzip a fresh Piwik over my current one? And is this also the way to update the GeoIP Plugin only, as you have suggested to other users?


#4

Oh, and here is the full backtrace when clicking on the Settings - GeoLocation button:


There is an error. Please report the message (Piwik 1.12) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

 Notice: Uninitialized string offset: 0 in /www/htdocs/w00ed371/piwik/libs/MaxMindGeoIP/geoip.inc on line 627 

Backtrace -->

 #0 Piwik_ErrorHandler(...) called at [/www/htdocs/w00ed371/piwik/libs/MaxMindGeoIP/geoip.inc:627]
 #1 _geoip_seek_country(...) called at [/www/htdocs/w00ed371/piwik/libs/MaxMindGeoIP/geoip.inc:499]
 #2 geoip_country_id_by_addr(...) called at [/www/htdocs/w00ed371/piwik/libs/MaxMindGeoIP/geoip.inc:517]
 #3 geoip_country_code_by_addr(...) called at [/www/htdocs/w00ed371/piwik/plugins/UserCountry/LocationProvider/GeoIp/Php.php:125]
 #4 Piwik_UserCountry_LocationProvider_GeoIp_Php->getLocation(...) called at [/www/htdocs/w00ed371/piwik/plugins/UserCountry/LocationProvider/GeoIp.php:100]
 #5 Piwik_UserCountry_LocationProvider_GeoIp->isWorking(...) called at [/www/htdocs/w00ed371/piwik/plugins/UserCountry/LocationProvider/GeoIp/Php.php:186]
 #6 Piwik_UserCountry_LocationProvider_GeoIp_Php->isWorking(...) called at [/www/htdocs/w00ed371/piwik/plugins/UserCountry/LocationProvider.php:215]
 #7 Piwik_UserCountry_LocationProvider::getAllProviderInfo(...) called at [/www/htdocs/w00ed371/piwik/plugins/UserCountry/Controller.php:39]
 #8 Piwik_UserCountry_Controller->adminIndex(...) called at [:]
 #9 call_user_func_array(...) called at [/www/htdocs/w00ed371/piwik/core/FrontController.php:125]
 #10 Piwik_FrontController->dispatch(...) called at [/www/htdocs/w00ed371/piwik/index.php:47]


(Matthieu Aubry) #5

delete the file misc/*dat and try again ?


#6

Yes, that is it! Sounds silly, but that was the info I was missing, deleting both .dat files and putting the fresh one into the misc folder.

Thanks a lot. Any idea for the index override? It is a little weird not to be able to call the login page anymore :slight_smile:


#7

I’ve got the same problem with GeoIp and would appreciate any help :slight_smile: