barnez on "[Plugin: NinjaFirewall (WP Edition)] Firewall won't load on new server setup"

ساخت وبلاگ

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://wordpress.org/plugins/ninjafirewall/

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 retu "LITESPEED" as their PHP SAPI.

baez
Member
Posted 17 minutes ago #

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?

Just read this thread which seems relevant: https://wordpress.org/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.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 230 تاريخ : يکشنبه 6 تير 1395 ساعت: 3:08