Title: Cannot retrieve user options from database (#3)
Last modified: August 31, 2016

---

# Cannot retrieve user options from database (#3)

 *  Resolved [loki_mdog](https://wordpress.org/support/users/loki_mdog/)
 * (@loki_mdog)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-retrieve-user-options-from-database-3/)
 * I am getting this message when I got to use the plugin after installation.
 * When I run the ninja check, I get this:
    NinjaFirewall detection : NinjaFirewall
   is loaded but returned error code #6
 * From the db check, I get this:
    Attempting to connect to the DB: OK Attempting
   to read NinjaFirewall’s options (nfw_options) from the DB: OK
 * But looking at the difference in the way the checks are run, the error code six
   does a fetch whereas the db check only makes sure it has a result.
 * DB check does not run this:
    $nfw_[‘options’] = @$nfw_[‘result’]->fetch_object()
   in lib/firewall.php.
 * Prior to that, if I print_r($nfw_[‘result’]), it is populated with some empty
   fields…I figure it hasn’t fetch the data at this point.
 * When I run this straight from the command line:
    `SELECT * FROM wp_options WHERE
   option_name = 'nfw_options'` I do get data back.
 * I changed the query in lib/firewall.ph so wp_options was hard coded and that 
   didn’t help either.
 * This seems like it should be really simple but I don’t know what I am missing.
 * Ideas?
 * Extra info:
    Linux 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 
   2016 x86_64
 * HP API 20100412
    PHP Extension 20100525 Zend Extension 220100525 Zend Extension
   Build API220100525,NTS PHP Extension Build API20100525,NTS
 * Apache Version Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips
    Apache API Version 
   20120211
 * Loaded Modules core mod_so http_core mod_access_compat mod_actions mod_alias 
   mod_allowmethods mod_auth_basic mod_auth_digest mod_authn_core mod_authn_file
   mod_authz_core mod_authz_host mod_authz_owner mod_authz_user mod_autoindex mod_deflate
   mod_dir mod_echo mod_env mod_expires mod_ext_filter mod_filter mod_headers mod_include
   mod_info mod_log_config mod_logio mod_mime_magic mod_mime mod_negotiation mod_remoteip
   mod_reqtimeout mod_rewrite mod_setenvif mod_status mod_substitute mod_suexec 
   mod_unique_id mod_unixd mod_userdir mod_version mod_vhost_alias mod_lua prefork
   mod_ssl mod_systemd mod_php5
 * [https://wordpress.org/plugins/ninjafirewall/](https://wordpress.org/plugins/ninjafirewall/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-retrieve-user-options-from-database-3/#post-7322880)
 * Hi,
 * I updated the DB test script, it will now call fetch_object() and output error
   if any: [http://nintechnet.com/share/wp-db.txt](http://nintechnet.com/share/wp-db.txt)

Viewing 1 replies (of 1 total)

The topic ‘Cannot retrieve user options from database (#3)’ is closed to new replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-retrieve-user-options-from-database-3/#post-7322880)
 * Status: resolved