• Resolved Paddy Landau

    (@paddy-landau)


    I installed this plugin yesterday, and enabled Turnstile. The “Test Keys” button displays the message, “Keys Validated!”

    EDIT: I’m getting the same results when I use Google reCAPTCHA.

    I test this on an Guest profile in Chrome, so there no extensions, cache, cookies, etc. I also test it on my Android phone using a different IP address.

    On the website, the plugin usually displays the message (but, bizarrely, not always). When it does display the message, usually it doesn’t let me go past pressing the button. I can press the button repeatedly, and it just stays there. But, occasionally, it lets me go past.

    On the back end, my PHP error log file has received this message many times:

    [27-Nov-2024 10:27:04 UTC] PHP Warning:  Undefined array key "SERVER_ADDR" in /home/customer/www/[redacted]/public_html/wp-content/plugins/recaptcha-for-all/functions/functions.php on line 609

    Running phpinfo() shows that $_SERVER['SERVER_ADDR'] is defined.

    WordPress version 6.7.1
    PHP version 8.3.14

    I have no idea what to do about this. Please help.

    • This topic was modified 1 year, 6 months ago by Paddy Landau. Reason: More information
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author sminozzi

    (@sminozzi)

    Hi Paddy,


    Thank you for letting me know.
    I will run tests on my server and let you know this afternoon, London time zone.

    Regards,
    Bill

    Plugin Author sminozzi

    (@sminozzi)

    Hi Paddy,

    Regarding the issue where pressing the button does not allow you to proceed, check your console for any JavaScript errors. If there are JavaScript errors on your site, it can prevent menus and buttons from working properly, as well as interfere with communication with Google or Cloudflare, among other issues. Our free plugin, WPTools, captures JavaScript errors and logs them, displaying them for your review. For more information, visit our troubleshooting page:

    https://siterightaway.net/troubleshooting/

    https://siterightaway.net/test-for-conflicts/

    If no JavaScript errors are found, and if you are using Cloudflare, please check if the issue also occurs with Google.

    Regarding the undefined variable error, it should either appear consistently or never, not intermittently. Nonetheless, I will create a new version of our plugin today that checks if the variable is defined before using it. In my opinion, it should always be defined by the hosting.

    I noticed you are using the latest PHP version, which was released just a few days ago. I’m unsure if it’s a good idea to use it on a production site. I recommend trying a slightly older and well-tested version, such as 8.2.x

    I’ve just tested our two sites using the plugin (one with Google, another with Cloudflare), and both are functioning well. If possible, please visit them and let us know your feedback.
    https://RecaptchaForAll.com

    and

    https://siterightaway.net/Contact/

    If possible, visit our support site and provide your site URL so I can check it.

    https://BillMinozzi.com/support/

    Thanks again for the feedback.

    Regards,

    Bill

    Thread Starter Paddy Landau

    (@paddy-landau)

    Thank you for fast response, Bill! I’ve updated the plugin, and I no longer get the PHP errors.

    I downgraded to PHP Version 8.2.26, and everything continued to work exactly as before.

    So, for the troubleshooting, I disabled all plugins except yours, and this time it worked. That means that one of my plugins is misbehaving.

    Unfortunately, on re-enabling the plugins to try to find out which one was problematic, my site broke. I cannot image why! I’m going to restore the site to the live version (all of this testing is being done on a staging site), and try again.

    I’ll let you know the results.

    Thank you again.

    Plugin Author sminozzi

    (@sminozzi)

    Thank you for the update!

    Just to clarify, the messages you were receiving earlier were not errors; they were only warnings.

    Please, let me know when you restore it.

    Thread Starter Paddy Landau

    (@paddy-landau)

    OK, I got some results.

    When I disable the caching plugin, your plugin works. But, it breaks the site. This happens even if I clear all other caches (including the server’s cache).

    When I disable your plugin and re-enable the caching plugin, the site works again (but of course then I don’t have your plugin’s protection).

    When I say “breaks the site”, specifically it means that much of the formatting is removed from the site.

    Do you have a suggestion for how I could diagnose this, please?

    Host: SiteGround
    Caching plugin: SiteGround’s Speed Optimizer

    Thank you

    Plugin Author sminozzi

    (@sminozzi)

    I suggest you try another caching plugin. I’m not sure if a caching plugin aligns well with the concept of reCAPTCHA, where each user is individually tested before accessing the site. As a result, each user experience is unique. I don’t use caching on any of my sites, even on those without reCAPTCHA, so I don’t have much experience with it.

    I use our free plugins, Stop Bad Bots and Anti Hacker, on all of our nearly 50 sites. On the two that have a contact form, I also use reCAPTCHA for All.
    Thank you by the feedback.

    Thread Starter Paddy Landau

    (@paddy-landau)

    Thank you for the advice, Bill.

    I’ve had a look at your Stop Bad Bots, and it looks good. I’m going to try it.

    Your anti-hacker plugin duplicates some of what my host does, but I’ll experiment with it anyway.

    Plugin Author sminozzi

    (@sminozzi)

    You are welcome!

    The Anti Hacker plugin has several usefull tools, and you can choose which ones you want to use.

    Thread Starter Paddy Landau

    (@paddy-landau)

    I’m running the Anti-Hacker malware scan at the moment. It has produced an error, a few times:

    [28-Nov-2024 12:29:53 UTC] PHP Warning:  Undefined variable $termina in /home/customer/www/[redacted]/public_html/wp-content/plugins/antihacker/dashboard/mybanners.php on line 222

    I’m sure that this is nothing serious, but you’d probably want to know about it!

    Plugin Author sminozzi

    (@sminozzi)

    Thank you for the feedback. It’s just a warning, but I’ve noted it down to fix in the next version.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Undefined array key “SERVER_ADDR”, and erratic behaviour’ is closed to new replies.