After updating to 3.2.1-b1 the piwik page stays white and I get the following error on the php log
PHP Fatal error: Cannot redeclare geoip_country_code_by_name_v6() in /var/www/piwik/vendor/geoip/geoip/src/geoip.inc on line 1593
I am using GeoIP (PECL) for localization and have installed the php-geoip package on my server, which worked before the update with PHP 7.1.11.
Locally the latest 3.x-dev works without issues, so I am not sure how to reproduce it.
The more I think about it the less sure I am if php-geoip even works with php7.1.
Locally I am using debian testing and the php-geoip only contains a config for php7.0.
On the server I am using the php packages from https://packages.sury.org/php and their php-geoip
seems to contain newer versions of geoip which also seem to be working correctly on my php7.1 piwik instance (until the update)
/etc /etc/php /etc/php/5.6 /etc/php/5.6/mods-available /etc/php/5.6/mods-available/geoip.ini /etc/php/7.0 /etc/php/7.0/mods-available /etc/php/7.0/mods-available/geoip.ini /etc/php/7.1 /etc/php/7.1/mods-available /etc/php/7.1/mods-available/geoip.ini /etc/php/7.2 /etc/php/7.2/mods-available /etc/php/7.2/mods-available/geoip.ini /usr /usr/lib /usr/lib/php /usr/lib/php/20131226 /usr/lib/php/20131226/geoip.so /usr/lib/php/20151012 /usr/lib/php/20151012/geoip.so /usr/lib/php/20160303 /usr/lib/php/20160303/geoip.so /usr/lib/php/20170718 /usr/lib/php/20170718/geoip.so
could you check if
libs/MaxMindGeoIP is deleted?
I'm seeing the same issue on my dev environment.
could you check if libs/MaxMindGeoIP is deleted?
It seems to be gone (I have in the meantime rolled back to the stable piwik version)
libs/MaxMindGeoIP exists for me
remove the folder and restarted apache, still getting the same error
and yes, I didn't backup before updating...
I unziped the latest build.zip to a new vhost on the same server using the same php version. After going through the setup (to a new database) and setting the geolocation to PECL I made the update to the beta version and piwik is broken again.
So in my case the issue doesn't have to do with the folder.
I wasn't sure if opcache could cause this a I have enabled it recently, but restarting php and manually clearing opcache didn't change anything
As this update doesn't update the database, I think you should be able to get it working again by downloading the latest stable piwik, replacing your current folder with the content of the zip and copying your config.php and plugins over.
I unziped the stable version over top of my existing install (backed up config and plugins), it loaded fine
for the record, I am using the GeoIP(Php) provider, as my piwik only does intranet traffic.
I quickly commented the line in
/etc/php/7.1/mods-available/geoip.ini out (
extension=geoip.so) and restarted php7.1 and my new setup works.
So it is definitly related to the fact that the PECL module is enabled.
@sgu222e If you aren't using it you should be able to disable the module and circumvent this issue.
See also https://github.com/maxmind/geoip-api-php/issues/27 and https://github.com/maxmind/geoip-api-php/issues/6, which seems to indicate that this can't really be avoided as the php module and the composer autoloader try to define the same functions.
I think it is related to having the PECL module installed, not just activated., I commented out (extension=geoip.so) in /etc/php.d/40-geoip.ini and restarted Apache, I was able to update to the latest version without an issue.
GeoIP (Php) continues to work.
Any idea why this error didn't occur with the libs/MaxMindGeoIP version, why was it not also redefining errors? I remember we patched some code in the past and wrapped functions around
The way I see it:
It might be a good idea to disable this beta version as it is still breaking new upgrades. :-)