• Resolved talgalili

    (@talgalili)


    As of today I started seeing the following error:

    NinjaFirewall fatal error: Cannot find WordPress configuration file. Review your installation, your site is not protected.

    My site loads fine, and I have not changed any settings or plugins before it started happanning.

    Any suggestions on what to do?
    Thanks.

    https://ww.wp.xz.cn/plugins/ninjafirewall/

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

    (@nintechnet)

    Hi,

    This means the firewall can’t find your wp-config.php file. Is it located in the WordPress root folder (default) or elsewhere?

    Thread Starter talgalili

    (@talgalili)

    This is odd, I now no longer see this error message.

    I checked the wp-config.php when I have seen the error and it was at the same spot (root) as I have left it since the installation of the blog.

    Has such a thing happened (been reported) in the past?

    Plugin Author nintechnet

    (@nintechnet)

    I have never heard of such an issue. That’s odd indeed.

    Thread Starter talgalili

    (@talgalili)

    update:
    I have two computers (home/work).
    I see this error only on my work computer.
    I also notice that it seems to be working, but the error message is available on all admin pages.

    What could I check?

    Plugin Author nintechnet

    (@nintechnet)

    You can log out of the admin dashboard and try to access http://your-site.tld/index.php?test=hack%00
    If the firewall is loaded, you should be blocked.

    Unless you are having caching issue, I cannot find any reason why the error message will appear on one computer only.

    Thread Starter talgalili

    (@talgalili)

    I am using wp-cuper-cache, I cleared the cache and the error persists.
    I went to the live log screen and got:
    Error: NinjaFirewall must be enabled and working in order to use the Live Log feature.

    What should I check next?

    Thanks.

    Plugin Author nintechnet

    (@nintechnet)

    Try to use the .htninja user configuration script to give the full path to your wp-config.php.
    See the “Path to wp-config.php” section from the above link.

    Thread Starter talgalili

    (@talgalili)

    Problem solved.

    I have uploaded the .htninja file in the past. And in it there is the following line:
    $wp_config = ‘/foo/bar/wp-config.php’;

    I never noticed it, and it caused the problem.

    This leaves the following issues:
    1) Why didn’t I see this error when looking at the site from my home computer?
    2) Maybe in your example .htninja file it would be best to comment out that line.

    Thank you for a great plugin, and the suggestions on how to troubleshoot this.

    With regards,
    Tal

    Plugin Author nintechnet

    (@nintechnet)

    All instructions from the “.htninja.sample” script are disabled: https://plugins.trac.ww.wp.xz.cn/browser/ninjafirewall/trunk/.htninja.sample

    But they weren’t in the older releases of NinjaFirewall.

    Thread Starter talgalili

    (@talgalili)

    Good to know.

    A second question (maybe related):
    When I go to “Live Log”, I get
    Error: Live Log did not receive the expected response from your server:

    And it just loads the home page url in the screen.
    Is this somehow related?

    Thanks.

    Plugin Author nintechnet

    (@nintechnet)

    This seems to be a PHP session issue.
    Go to the “NinjaFirewall > Overview” page and check if you see any error/warning there.

    Thread Starter talgalili

    (@talgalili)

    Yes.
    It says:

    User session It seems the user session was not set by the firewall script or may have been destroyed by another plugin. You may get blocked by the firewall while working from the WordPress administration dashboard.

    Plugin Author nintechnet

    (@nintechnet)

    That is a PHP session issue.
    See this discussion: https://ww.wp.xz.cn/support/topic/user-session-1

    Hi,
    I can’t installer WPNF. The error message is: “Error: I cannot download the security rules from ww.wp.xz.cn.”

    previus this message:
    “Your WordPress directory (/home/my-site/public_html/) is different from your website document root (/home/my-site/public_html//). Because it is possible to install WordPress into a subdirectory, but have the blog exist in the site root, NinjaFirewall needs to know the exact location of the site root.

    Please edit the path below only if you have manually modified your WordPress root directory as described in the Giving WordPress Its Own Directory article.

    Most users should not change this value.

    Path to WordPress site root directory: /home/my-site/public_html/”

    Why this: /home/my-site/public_html// (double //)

    I have not installed the plugin in other subdirectory

    Thanks

    Plugin Author nintechnet

    (@nintechnet)

    When you install the firewall, it will connect to the ww.wp.xz.cn repo to download the latest security rules.
    Either you have connection issues or maybe your server does not support HTTPS (it connects to ww.wp.xz.cn over HTTPS)?
    You can try to edit your wp-config.php script and add this line:

    define('NFW_DONT_USE_SSL', 1);

    The firewall will not use HTTPS.

    Regarding the double slash (//), it means you have an error in your server vhost configuration, the $_SERVER[‘DOCUMENT_ROOT’] variable ends with a trailing slash. But you can safely ignore it.

Viewing 15 replies - 1 through 15 (of 16 total)

The topic ‘"Cannot find WordPress configuration file"’ is closed to new replies.