Lunarpages Web Hosting Forum

Author Topic: Piwik & mod_security  (Read 11843 times)

Offline maxwms

  • Space Explorer
  • ***
  • Posts: 8
Piwik & mod_security
« on: June 03, 2014, 06:07:18 AM »
I am trying to get Piwik to work again after my MySQL files were corrupted. After doing a complete reinstall, I'm not getting any tracking info. Ran across the following as a possible cause:

How do I configure Piwik when mod_security is enabled?

Unfortunately, Piwik is not compatible with the Apache web server module mod_security. If your web host uses mod_security to block requests containing URLs (eg. hosts like HostGator, The Planet), you should contact your provider to have your Piwik application whitelisted and have mod_security disabled for Piwik.

With mod_security enabled Piwik will look like it works but mod_security has and will create major bugs in Piwik, including major data loss as requests are discarded by mod_security!

Could mod_security be the problem?


Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6429
Re: Piwik & mod_security
« Reply #1 on: June 03, 2014, 08:51:43 AM »
mod_security might well prevent your system from working (but I don't know if LP uses it). Note that it can't possibly directly corrupt your database -- it just prevents certain data from being passed through GET or PUT. It's a strange coincidence if just while restoring your database, LP happened to change mod_security settings. More likely, there's something wrong with your database setup, or your backup was corrupt. Also check your own .htaccess files to make sure they're not breaking QUERY_STRINGs.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline gavind

  • Spaceship Navigator
  • *****
  • Posts: 96
Re: Piwik & mod_security
« Reply #2 on: August 30, 2014, 06:43:37 AM »
Hi Max, any updates yet if you were able to fix this issue? It would be nice if possible, that you can share the steps here really quick.