Support » Plugin: NinjaFirewall (WP Edition) - Advanced Security » The plugin does not have a valid header.

  • Resolved losdos

    (@losdos)


    When installing the plugin, then pressing “Activate” I received the following error message page:

    “The plugin does not have a valid header.”

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author nintechnet

    (@nintechnet)

    That means some files are missing or are corrupted. Uninstall it and re-install it, preferably from the WordPress plugins page (“Plugins > Add New”, then enter “ninjafirewall” in the “Search plugins” input field and install it from the list).

    I have the same The plugin does not have a valid header. error whether I add via “Search plugins” or download from your site and upload.

    This is being installed on a shared site beneath another install. Versions prior to 4.0 installed fine on sites beneath the parent.

    After the “The plugin does not have a valid header.”, If I click on the activate button from the plugin page, the activation states it was successful and says it is running in Full WAF mode, but the .htaccess and php.ini is never modified.

    I had no issues with the older version, the auto_prepend line was added to php.ini and the suPHP_ConfigPath was added to .htaccess just fine.

    Even changing the parent install to debug mode did not stop the install error. Could I download an older version and upgrade to 4.0? That worked on the other three child installs.

    Plugin Author nintechnet

    (@nintechnet)

    I think I know why: there are 2 ninjafirewall.php scripts: one in the plugin root folder:
    wp-content/plugins/ninjafirewall/ninjafirewall.php
    This is main file of the plugin.

    And one in the plugin lib/ sub-folder:
    wp-content/plugins/ninjafirewall/lib/ninjafirewall.php
    This is a loader.

    For whatever reason, your blog could be fetching the one in the lib/ folder instead of the one in the root folder.
    Can you try to edit the lib/ninjafirewall.php and remove the 3rd line:

    Plugin Name: NinjaFirewall (WP Edition)
    

    Then, try again to activate it.

    Removing the line: Plugin Name: NinjaFirewall (WP Edition)
    from the lib/ninjafirewall.php did allow activation, however the overview page says:
    Firewall Enabled
    Mode NinjaFirewall is running in Full WAF mode.
    Edition WP Edition ~ Need more security? Get Premium!
    Version 4.0 ~ Security rules: 2019-07-01.2
    PHP SAPI CGI-FCGI ~ 7.2.19

    and neither the php.ini or .htaccess in the root of the child site was modified

    Plugin Author nintechnet

    (@nintechnet)

    This is being installed on a shared site beneath another install.

    I think this is your issue: the site inherit the firewall from its parent folder. Always disable the firewall in the parent folder when installing it in a sub-folder. Then you can go ahead with the installation and re-enable it in the parent folder afterwards.

    I installed NF on 3 other child sites using v3.x without error, I’ll try your suggestion and report back

    I simply deactivated the plugin on the parent and upon activating on the child, I still received the “The plugin does not have a valid header.” error.

    I guess I could manually edit the .htaccess and php.ini, but I’d imagine you want to fix the issue.

    Plugin Author nintechnet

    (@nintechnet)

    I will update a new file in a few minutes, you could test it.

    Plugin Author nintechnet

    (@nintechnet)

    Let’s try:

    1. Download this file (make sure you are running NF 4.0): https://plugins.trac.wordpress.org/export/HEAD/ninjafirewall/trunk/lib/utils.php
    2. Over FTP, upload it into your /ninjafirewall/lib/ folder and overwrite the current one.
    3. Rename the /ninjafirewall/lib/ninjafirewall.php to /ninjafirewall/lib/loader.php.

    Try again to enable it.
    It looks like your WP install is confused about this lib/ninjafirewall.php file.

    OK, more info….

    I disabled NF on the parent
    renamed the php.ini in the root of the parent
    commented out the below section of the .htaccess in the root of the parent:
    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/*****/public_html
    </IfModule>

    and still receive the “The plugin does not have a valid header.” error upon activating.

    As an FYI, on the other three child sites, I was able to install v3.x without disabling the parent and was successful at them upgrading to 4.0

    Just saw your above post and will report back…

    That gave me the following error:

    Plugin could not be activated because it triggered a fatal error.

    Error, cannot write /home/*****/public_html/mysite.tld/wp-content/mu-plugins/0-ninjafirewall.php. Check your server permissions and try again.

    Plugin Author nintechnet

    (@nintechnet)

    That’s my mistake, an error in the uploaded file 🙁
    Try to download the new one: https://plugins.trac.wordpress.org/export/HEAD/ninjafirewall/trunk/lib/utils.php

    /home/*****/public_html/mysite.tld/wp-content/mu-plugins/0-ninjafirewall.php exists with permissions set to 644

    Plugin activated with that one, overview is saying:
    Mode NinjaFirewall is running in Full WAF mode.

    yet, the php.ini nor the .htaccess has been modified on the child site.

Viewing 15 replies - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.