I can’t reproduce the problem.
Did you try to uninstall it and then to reinstall it ?
Make sure to remove any line in your PHI INI (.user.ini) file when you reinstall it, just in case.
I uninstalled it before the migration to ensure no 500 error code.
I re-installed it after the migration but I can’t activate it. There is no .user.ini file, it is deleted. I can’t activate the plugin, I get the same error.
Can you run the troubleshooter script: https://nintechnet.com/share/wp-check.txt
- Rename it to “wp-check.php”.
- Upload it into your WordPress root folder.
- Go to https://YOUR WEBSITE/wp-check.php
- Delete it afterwards.
Hi!
I got exactly the same problem today, move my website and being unable to activate NinjaFirewall. I deleted the whole folder from the plugins folder and installed NinjaFirewall again afterwards, but not success.
[09-Oct-2024 13:06:16 UTC] PHP Fatal error: Uncaught Error: Undefined constant "NFW_RULES" in /home/website/domains/website.nl/public_html/wp-content/plugins/ninjafirewall/lib/install_default.php:171
Stack trace:
#0 /home/website/domains/website.nl/public_html/wp-content/plugins/ninjafirewall/ninjafirewall.php(161): nfw_load_default_conf()
#1 /home/website/domains/website.nl/public_html/wp-includes/class-wp-hook.php(324): nfw_activate()
#2 /home/website/domains/website.nl/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /home/website/domains/website.nl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/website/domains/website.nl/public_html/wp-admin/includes/plugin.php(703): do_action()
#5 /home/website/domains/website.nl/public_html/wp-admin/plugins.php(60): activate_plugin()
#6 {main}
thrown in /home/website/domains/website.nl/public_html/wp-content/plugins/ninjafirewall/lib/install_default.php on line 171
Here is the result from the wp-check.php file:
NinjaFirewall (WP edition) troubleshooter
HTTP server : LiteSpeed
PHP version : 8.3.11
PHP SAPI : LITESPEED
auto_prepend_file : none
wp-config.php : found in /home/website/domains/website.nl/public_html/wp-config.php
NinjaFirewall detection : NinjaFirewall is not loaded
Loaded INI file : /opt/alt/php83/etc/php.ini
user_ini.filename : .user.ini
user_ini.cache_ttl : 300 seconds
User PHP INI : none found
DOCUMENT_ROOT : /home/website/domains/website.nl/public_html
ABSPATH : /home/website/domains/website.nl/public_html/
WordPress version : 6.6.2
WP_CONTENT_DIR : /home/website/domains/website.nl/public_html/wp-content
Plugins directory : /home/website/domains/website.nl/public_html/wp-content/plugins
User Role : Administrator
User Capabilities : manage_options: OK - unfiltered_html: OK
Log dir permissions : /home/website/domains/website.nl/public_html/wp-content/nfwlog dir is writable
Cache dir permissions : /home/website/domains/website.nl/public_html/wp-content/nfwlog/cache dir is writable
Configuration & Rules :
* Options: not found
* Rules: not found
NinjaFirewall (WP edition) troubleshooter v1.10
Thank you!
-
This reply was modified 1 year, 5 months ago by
janij. Reason: Additional information
Can you run this script: https://nintechnet.com/share/ninja-connect.txt
1. Rename it to “ninja-connect.php”.
2. Upload it into your website root folder.
3. Go to https://YOUR WEBSITE/ninja-connect.php
4. Delete it afterwards.
That will check if your site can connect to download the rules during the installation process.
Didn’t change a thing after my last message, but just now I managed to activate the plug-in.
After it I did try the ninja-connect.php file and got this back:
Attempting to connect to:
* updates.nintechnet.com/index.php (HTTPS): OK
* wordpress.nintechnet.com/index.php (HTTPS): OK
* pro.nintechnet.com/index.php (HTTPS): OK
* api.nintechnet.com/test (HTTPS): OK
* plugins.svn.wordpress.org/ninjafirewall/updates/version3.txt (HTTPS): OK
NinjaFirewall (WP/WP+/Pro/Pro+ editions) connection test script v1.3
Don’t know what changed since last time, but the problem is fixed for me now.
I encountered the same issue. After deleting /wp-content/nfwlog, I was able to activate it properly.
I got the very same problem. Would be great if there would be a fix sometime? Have to move websites from one server to another server fromt time to time.
This problem seems to be new, because otherwise a migration usually went smoothly (deactivate full-WAFF mode, deactivate Ninja Firewall and uninstall. After the migration, reinstalling the Ninja Firewall always went smoothly)
Edit: After deleting /wp-content/nfwlog, I was able to activate it properly. Thanks SHAO!!!
I’m currently looking at it.
The issue seems very new but the code where the error occurred hasn’t been changed for years.
I found the problem. I will be fixed in the next release.