• Resolved barnez

    (@pidengmor)


    Disabled and uninstalled NinjaFirewall. Migrated site to new cPanel installation on a different server. Now can’t get past the setup stage.

    Have configuration set as Litespeed and .user.ini but firewall won’t load. Rules are found in the .user.ini and .htaccess files. Followed FAQs and left for 5 minutes but no change. Tried adding the following to .htaccess with correct path but no change:

    <IfModule mod_env.c>
       SetEnv PHPRC /home/path/to/.user.ini
    </IfModule>

    Have run out of ideas. Here is the output from the troubleshoooter script:

    HTTP server 	: 	Apache
    PHP version 	: 	5.4.45
    PHP SAPI 	: 	LITESPEED
    
    auto_prepend_file 	: 	none
    NinjaFirewall detection 	: 	NinjaFirewall is not loaded	
    
    Loaded INI file 	: 	/usr/local/lib/php.ini
    user_ini.filename 	: 	.user.ini
    user_ini.cache_ttl 	: 	300 seconds
    User PHP INI 	: 	.user.ini found -
    
    DOCUMENT_ROOT 	: 	/home/xxxx/public_html
    .htninja 	: 	found in /home/xxxx/.htninja
    wp-config.php 	: 	found in /home/xxxx/wp-config.php

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

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

    (@nintechnet)

    Hi

    Did you try to rename the .user.ini to php.ini?
    Mod_env is not a LiteSpeed module, hence the PHPRC directive is not needed.

    Also, if that isn’t your own server, ask your host if it is really running LiteSpeed or OpenLitespeed (which does not support .htaccess and PHP INI files, except the server main php.ini). Both return “LITESPEED” as their PHP SAPI.

    Thread Starter barnez

    (@pidengmor)

    Hi,

    Thanks for getting back. Yes, I tried the renaming to php.ini but no change. The spec for the server is Apache/Nginx web stack and cPanel states that the server type is Apache 2.4.18 (I’ve tried Nginx + CGI). The redirect rules are working in .htaccess so that file type is definitely supported. After looking through the FAQs I find:

    Any php.ini files that are placed inside your website are ignored by the server for security reasons.

    We support a broad range of PHP versions from 5.2 to 7.0, and an even broader array of extensions, and php.ini settings.

    Looks like I can only adjust common php.ini setting through the cPanel: https://snag.gy/YxpGC0.jpg

    Any solution to this as it doesn’t seem like I can request that php.ini is enabled?

    Thread Starter barnez

    (@pidengmor)

    Just read this thread which seems relevant: https://www.ads-software.com/support/topic/mdd-hosting-no-phpini-support?replies=18

    Tried selecting Apache + PHP5 from the installer. The rules are in place at the head of .htaccess but still no progress forward.

    Plugin Author nintechnet

    (@nintechnet)

    Did you ask your host about that?
    Your account may have some restrictions.

    Thread Starter barnez

    (@pidengmor)

    Yes, the account restricts the ability to use php.ini or .user.ini. In that case I assume that I will be unable to use the plugin, which is a dilemma as I have 2 x active licences for NFW+. No other way around this?

    Plugin Author nintechnet

    (@nintechnet)

    Maybe you can try to include the ‘/nfwplus/lib/firewall.php’ script at the top of the wp-config.php file, but that will limit the firewall features.
    It’s probably better to enable its debugging option to test it and prevent any problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Firewall won't load on new server setup’ is closed to new replies.