I just have deactivated NF and changed admin email. Then i have reactivated NF again and didn’t see any noctice.
NF iss very strange.
Hi,
Where did you change the admin email: From the WordPress “Users” menu, or the “Settings” Menu or from NinjaFirewall “Event Notifications” menu?
Maybe you (or your host) had a database backup running and the tables were locked which would explain the message? Or your DB was too slow and it was not possible to connect to it?
I can change the admin password and I don’t get any error.
No, there is no backup running or my DB is too slow.
I run 2 site on a VPS 2GB ram. Everthing are very fast.
I have tried to change email 3 times. This notice always display.
Did you check MySQL log?
The firewall will display the error message if this query failed:
SELECT * FROM '{table_prefix}options' WHERE 'option_name' = 'nfw_rules'
Where i can find MySQL log file ?
I’m using MariaDB on EasyEngine.
Depends on your OS, distro etc.
Folders:
/var/log/ and /var/log/mysql/
/var/lib/mysql/
Files: /var/log/messages
I’m installing all site on Ubuntu. I had install suhoshin on my VPS.
There is no error message in log file.
I have checked /var/log/mysql and all log files in /var/log
We can force NinjaFirewall to write the error message to the dashboard.
But fist, I need to know which message exactly you received because there are 3 differents ones.
Is it:
Cannot retrieve user rules from database (#1)
Or:
Cannot retrieve user rules from database (#2)
Or:
Cannot retrieve user rules from database (#3)
It is: Cannot retrieve user rules from database (#2)
As i remember it. π
You can try this:
1. Download the /plugins/ninjafirewall/lib/firewall.php to your computer.
2. Make a backup of it (very important).
3. Open firewall.php and search for those 2 lines:
–Line 325:
define( 'NFW_STATUS', 7 );
–Line 331:
define( 'NFW_STATUS', 8 );
-Replace those 2 lines with that one:
define( 'NFW_STATUS', htmlspecialchars($nfw_['mysqli']->error) );
4. Save and upload the new version.
5. Go to your admin dashboard and paste here the error message.
6. Restore the original firewall.php backup script.
I do as you say, but there is no error message, and there is no notice appear.
I will restore my VPS then i can test more.
After i restored my VPS, replaced your code, changed email again.
And this is a error message:
NinjaFirewall fatal error: unknown error #MySQL server has gone away. Review your installation, your site is not protected
.
That is a MySQL error/issue.
You will need to check the doc (http://dev.mysql.com/doc/refman/5.7/en/gone-away.html) and solve the problem.
Check time out values, connection etc.