WordPress.org

Support

Support » Plugins and Hacks » [Resolved] No Log-in History

[Resolved] No Log-in History

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author blobfolio
    Participant

    @blobfolio

    Hey steadybright,

    Thanks for all the details! Would you please check/confirm three things for me?

    1) Did the database tables get created? You should see *meow_log and *meow_log_banned (where * is your WP prefix)?

    2) Are you behind any sort of proxy that might be returning a reserved/internal IP instead of the user’s actual one?

    3) Is the $_SERVER[‘REMOTE_ADDR’] environmental variable being populated?

    steadybright
    Member

    @steadybright

    Hi Blobfolio,

    Thank you for your prompt reply. To answer your questions:

    1. Yes, both tables are present.
    2. No, I’m not behind a proxy.
    3. Please help me know where to look for this, so I may answer your question. 🙂

    steady

    Plugin Author blobfolio
    Participant

    @blobfolio

    Hey Steady,

    I’m sorry, #3 requires a little bit of PHP. But as an Arch user, I’m sure you’ve had to do worse!

    $_SERVER[‘REMOTE_ADDR’] is a PHP variable that should return the IP address of the visitor. The easiest way to see this and other variables is to make a quickie PHP file with the following code:
    <?php phpinfo(); ?>

    It is this variable that Apocalypse Meow tries to evaluate prior to logging a log-in attempt. If the value returned by this variable is not an IP, or falls within private or reserved ranges, or matches that of the server itself, then it can’t do its job, and so doesn’t log anything.

    To see how the above test actually evaluates on your server, please create a quickie PHP file somewhere on the server with the following code:
    <?php var_dump(filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)); ?>

    That should either print your IP if your IP is okedoke, or False. If it is False. Please let me know if you get your IP or False.

    Thanks for taking the time to help debug this plugin!

    steadybright
    Member

    @steadybright

    Hi Blob,

    I created the file with the code above, and the result was my WAN (external) IP address.

    Also, I checked my PHP Test page, and is lists the same IP address in the “REMOTE_ADDR” field in the “Apache Configuration” section. (Sorry for not cluing in on this the first time around.)

    By the way, I don’t think we are debugging your plugin, rather I think we are debugging my configuration. 🙂

    Thanks so much for your help.

    steady

    Plugin Author blobfolio
    Participant

    @blobfolio

    Hey Steady,

    Would you please let me know what other plugins you have installed? I’m going to try to recreate your setup and see if I can break something too! Thanks!

    steadybright
    Member

    @steadybright

    Hi Blob,

    Ok, we can stick a fork in this one. Your earlier statement:

    It is this variable that Apocalypse Meow tries to evaluate prior to logging a log-in attempt. If the value returned by this variable is not an IP, or falls within private or reserved ranges, or matches that of the server itself, then it can’t do its job, and so doesn’t log anything.

    was the clue that helped resolve the problem.

    I had set the LAN IP address as the WordPress Address and Site Address in the WordPress General Settings page. Once I updated the fields to the dynamic DNS URI, the problem disappeared.

    The PHP test page resolved my WAN IP because I entered the DDNS URI in the address bar, which stuck. However, in WP, the Site Address value replaced the URI I entered, resulting in unlogged logins for AM.

    Thanks for the critical bit of data, which ultimately resolved the problem.

    Thank you,

    steady

    Plugin Author blobfolio
    Participant

    @blobfolio

    Hey Steady,

    Thanks for the update, and I’m glad it’s working now!

    In the next release, I’ll include that IP validation test as part of the settings page itself, so it can be made clear when there are issues that could prevent logging.

    steadybright
    Member

    @steadybright

    Thank you for supporting your excellent plugin so well!

    steady

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] No Log-in History’ is closed to new replies.