@telx85 opened this Issue on November 17th 2016

G'day guys,

I have a VPS which has Piwik installed and WordPress under the same cPanel account. I noticed that when I ran a health check I received this error:

Piwik encoutered an error: Cannot redeclare getdnsattributes() (previously declared in /home/USERNAME/public_html/wp-content/plugins/wordfence/waf/wfWAFGeoIP.php:755) (which lead to: Error in PHP GeoIP provider: The Twig_Environment::clearTemplateCache method is deprecated since version 1.18.3 and will be removed in Twig 2.0. on line 523 of /home/USERNAME/public_html/statistics/vendor/twig/twig/lib/Twig/Environment.php)

If I turned of WordFence firewall I could run the health check. So then after reaching out to WordFence they responded with this:

So it would appear that Pwiki uses the same geoip database that we do and is not checking to see if that library is in use. We already do a "function_exists()" check before declaring the function. If Piwik did the same in their copy of the library, Wordfence and Pwiki would probably work ok together. Reach out to them and ask they fix that.

(Their copy of the GeoIP library, that is.)

Is this a bug?

Lastly I'm finding my php error log growing continually with the same error:

[14-Nov-2016 14:09:28 UTC] PHP Fatal error: Cannot redeclare geoip_load_shared_mem() (previously declared in /home/USERNAME/public_html/wp-content/plugins/wordfence/waf/wfWAFGeoIP.php:241) in /home/USERNAME/public_html/statistics/libs/MaxMindGeoIP/geoip.inc on line 1428


@tsteur commented on November 17th 2016 Member

Which health check did you run? Usually WordPress and Piwik is not loaded at the same time

@telx85 commented on November 18th 2016

Ah sorry should have given more information.

Ok so I know this is probably not ideal, but it works for me. I have a reseller shared hosting cPanel/WHM plan. Basically on my reseller log in I have the following apps installed via Installatron:

  • WordPress (runs my website) has a security plugin called WordFence installed
  • Piwik (runs analytics for me and for my other clients I have on my reseller cPanel hosting)
  • Owncloud (barely use it, but have it for obvious reasons)
  • osTicket (Open Source support ticketing system)

So the health check I'm talking about is the one in Piwik settings itself. It is actually called "System Check" found in ADMINISTRATION => SYSTEM CHECK (under heading DIAGNOSTIC)

@mattab commented on December 6th 2016 Member

Hi @telx85 please note these errors are from the wordfence plugin and not from Piwik, so we cannot help here. Cheers

@telx85 commented on December 8th 2016

G'day @mattab according to WordFence the error is Piwik's problem.

I also see this error when I'm running the system check IN Piwik, so as far as WordFence is concerned I don't have issue with that.

This is what I've received back from WordFence Support.

As much as I hate to tell you, since they refuse to fix what is an error in their code there isn't anything we can do.

@mattab commented on December 9th 2016 Member

Hi @telx85 that's correct actually, I didn't read the message properly. Can you try apply this change: https://github.com/piwik/piwik/pull/10987/files#diff-a34ec2f1b090494a615a4abdc9d4046c (the second change) and does it fix issue?

@telx85 commented on December 12th 2016

After applying your fix, I haven't had any issue. But I must admit that I don't continually check it, just noticed because I moved hosting and was fixing issues.

This Issue was closed on December 6th 2016
Powered by GitHub Issue Mirror