• Resolved riomurphy

    (@riomurphy)


    I love your plugin and have it installed successfully on several websites. However, I can’t figure out how to get the firewall working on a site hosted on Siteground.

    I’ve tried Apache CGI/FastCGI with .user.ini – no luck (even waiting 5 minutes); Apache CGI/FastCGI with php.ini – no luck; Apache + PHP5 module – no luck and Apache + suPHP – no luck (sounds familiar ??

    I ran the Ninjacheck.php and got the following:

    HTTP server: Apache
    PHP version: 5.5.17
    PHP SAPI: CGI-FCGI
    Loaded INI file: /home/xxx/public_html/php.ini
    auto_prepend_file: /home/xxx/public_html/wp-content/plugins/ninjafirewall/lib/firewall.php
    user_ini.filename: none
    user_ini.cache_ttl: 300
    user INI: .user.ini found
    PHPRC: unknown
    DOCUMENT_ROOT: /home/xxx/public_html
    wp-config.php: found
    ABSPATH: /home/xxx/public_html/
    WP version: 4.1
    WP_CONTENT_DIR: /home/xxx/public_html/wp-content

    Appreciate any help.
    Thanks,
    Debra

    https://www.ads-software.com/plugins/ninjafirewall/

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

    (@nintechnet)

    Hi,

    Loaded INI file: /home/xxx/public_html/php.ini
    auto_prepend_file: /home/xxx/public_html/wp-content/plugins/ninjafirewall/lib/firewall.php

    It is loaded and working in the root folder (/home/xxx/public_html/), but the php.ini does not seem to apply to all sub-directories. That could be the reason why it returns an error in the WP dashboard (which is located in the /wp-admin/ sub-folder).

    I would try the following:

    1. Use a php.ini. If NinjaFirewall created a .user.ini, delete it and just keep the php.ini.

    2. Edit (or create) the .htaccess in the WP root folder and add this code to it:

    <IfModule mod_env.c>
       SetEnv PHPRC /home/xxx/public_html/php.ini
    </IfModule>

    Replace /home/xxx/public_html/php.ini with the correct path to the php.ini.

    3. Log in to WP admin console and check if the firewall is working.

    Thread Starter riomurphy

    (@riomurphy)

    Adding the code to the .htaccess file did the trick!

    Many thanks.

    It worked for me too! The funny thing is that I didn’t have to go through the install process again. I’m guessing it was already “installed” in the sense that everything needed was created by the original install attempts, it just couldn’t work without the .htaccess setting.

    By the way, the SiteGround tech told me that the problem was that the plugin could not access FTP. Since there just doesn’t seem to be anything in the interface that asks for FTP access, that didn’t seem right. I will send him a link to this discussion.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Siteground hosting – Ninjafirewall won't load’ is closed to new replies.