NinjaFirewall (WP Edition)
[resolved] Piwik blocked (3 posts)

  1. maraboshi
    Posted 2 years ago #

    Hello there,

    I have an installation of Piwik under the main wordpress site (www.mywordpress.com/analytics/) which is being blocked by NinjaFirewall.

    Disabling the firewall it works, with the firewall enabled I get the following error:

    Debug: the original error was
    session has already been started by session.auto-start or session_start()

    session.auto-start is already set to 0 in php.ini.

    The firewall log shows the following "info"

    GET /analytics/piwik.php - Sanitising user input - [COOKIE: ["","",1386600075,"http://www.mywordpress.com"]]

    Any idea what I can change in the firewall config (if any) or should I move Piwik from the subdirectory?

    Many thanks in advance.



  2. nintechnet
    Plugin Author

    Posted 2 years ago #


    It looks like your script is calling the PHP session_start() function without checking whether a session was already created or not (it was created by NinjaFirewall).
    You would need to find that call in your script and make a small modification.

    Search for:


    And replace it with:

    if (! session_id() ) { session_start(); }

    The only other alternative would be to move your application into a folder that is not protected by NinjaFirewall.

  3. maraboshi
    Posted 2 years ago #


    Thanks a lot for the quick answer.

    Unfortunately it doesn't seem that simple to change so I'll just stick with using a different subdomain and separate Piwik completely from NinjaFirewall.

    In case you might be interested this is the related file, anyway:


    Thanks again.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NinjaFirewall (WP Edition)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic