Support » Plugin: Pareto Security » Errors

  • Resolved Sean Thompson

    (@seanthompson)


    Hi @te_taipo,

    Been using this plugin for years, thank you.

    Been getting some errors recently…

    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2379
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2379
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2379
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2948
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "SCRIPT_FILENAME" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1992
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 890
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "SCRIPT_FILENAME" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1992
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1014
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1150
    [04-Feb-2023 03:30:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in …/public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1218

    …Sean

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author te_taipo

    (@te_taipo)

    That is a rather strange issue. The line numbers 2948 and 2379 do not correlate to any code in pareto_functions.php that could be causing that.

    Couple of questions:
    1. What webserver are you using, and what version of PHP
    2. Has your webhost updated your webserver lately?

    Thread Starter Sean Thompson

    (@seanthompson)

    I’m on a Litespeed VPS running php 8.

    It turns out these errors are only on my own site which had an older version of Pareto Security. I have to manually check for updated and install them because I’m using ClassicPress and Pareto Security is listed as requiring WordPress 5.2 or higher. I updated it.

    The only error I’ve had with the current version is…

    [15-Jan-2023 12:21:12 UTC] PHP Warning: in_array() expects parameter 2 to be array, bool given in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1389

    Plugin Author te_taipo

    (@te_taipo)

    Thanks for that, fixed in the latest update released 5 minutes ago.

    Thread Starter Sean Thompson

    (@seanthompson)

    Thank you.

    Thread Starter Sean Thompson

    (@seanthompson)

    Still getting these…

    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2481
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2481
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "SERVER_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2481
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REMOTE_ADDR" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 3051
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "SCRIPT_FILENAME" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2077
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 904
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "SCRIPT_FILENAME" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 2077
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1029
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1165
    [06-Feb-2023 12:00:01 UTC] PHP Warning: Undefined array key "REQUEST_METHOD" in /public_html/wp-content/plugins/pareto-security/pareto_functions.php on line 1265

    I’ve run into this elsewhere since upgrading to php 8. Adding if ( isset() )` corrects the error.

    Plugin Author te_taipo

    (@te_taipo)

    On the face of it, using isset would be the easy fix, but in fact all that would be doing if basic PHP globals like SERVER_ADDR are not set, is disabling the script.

    If you are able to, can you upload a simple test file to your website, example test123.php and include the following code:

    <?php
    print_r( $_SERVER );
    ?>
    
    

    If you could then copy the output of that from the view source of your browser thanks. Need to take a look at what is going on. The webserver should populate the _SERVER array with all of the standard variables, but for some reason your configuration is not doing so.

    • This reply was modified 1 year ago by te_taipo.
    Thread Starter Sean Thompson

    (@seanthompson)

    Array([PATH] => /usr/local/bin:/bin:/usr/bin[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9[HTTP_ACCEPT_ENCODING] => gzip, deflate, br[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.9[HTTP_COOKIE] => wordpress_test_cookie=WP%20Cookie%20check; timezone=America/New_York; cpsession=oldtownweb%3ayoVD8wBWtyGIBmXo%2cd49ccd820a3352d8eecd4125f9e3049d[HTTP_HOST] => oldtownweb.com[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36[HTTP_CACHE_CONTROL] => max-age=0[HTTP_SEC_CH_UA] => "(Not(A:Brand";v="8", "Chromium";v="2022"[HTTP_SEC_CH_UA_MOBILE] => ?0[HTTP_SEC_CH_UA_PLATFORM] => "Windows"[HTTP_DNT] => 1[HTTP_UPGRADE_INSECURE_REQUESTS] => 1[HTTP_SEC_FETCH_SITE] => none[HTTP_SEC_FETCH_MODE] => navigate[HTTP_SEC_FETCH_USER] => ?1[HTTP_SEC_FETCH_DEST] => document[HTTP_X_HTTPS] => 1[DOCUMENT_ROOT] => /home/oldtownweb/public_html[REMOTE_ADDR] => 24.229.185.28[REMOTE_PORT] => 49272[SERVER_ADDR] => 69.10.41.78[SERVER_NAME] => oldtownweb.com[SERVER_ADMIN] => webmaster@oldtownweb.com[SERVER_PORT] => 443[REQUEST_SCHEME] => https[REQUEST_URI] => /test123.php[HTTPS] => on[LSCACHE_VARY_VALUE] => +webp[X_SPDY] => HTTP3[SSL_PROTOCOL] => QUIC[SSL_CIPHER] => TLS_AES_128_GCM_SHA256[SSL_CIPHER_USEKEYSIZE] => 128[SSL_CIPHER_ALGKEYSIZE] => 128[SCRIPT_FILENAME] => /home/oldtownweb/public_html/test123.php[QUERY_STRING] =>[SCRIPT_URI] => https://oldtownweb.com/test123.php[SCRIPT_URL] => /test123.php[SCRIPT_NAME] => /test123.php[SERVER_PROTOCOL] => HTTP/1.1[SERVER_SOFTWARE] => LiteSpeed[REQUEST_METHOD] => GET[X-LSCACHE] => on,crawler[PHP_SELF] => /test123.php[REQUEST_TIME_FLOAT] => 1675707952.5258[REQUEST_TIME] => 1675707952[argv] => Array()[argc] => 0)

    Plugin Author te_taipo

    (@te_taipo)

    Got that thanks, you can delete that now if you like

    Plugin Author te_taipo

    (@te_taipo)

    The only thing I can put this down to is that there are some cron jobs being run where PHP runs via command line, and in those instances the _SERVER global array is not being propagated fully. That is the only legitimate condition where that array may be empty, so it is ok then to add in the ISSET bypass, or in the remote address, report the server address instead. Latest update is out now. Let me know how this goes, and thanks again for reporting these issues.

    Thread Starter Sean Thompson

    (@seanthompson)

    Thank you. I do have a cron job set to run wp-cron.php which is disabled in wp-config.php. Maybe that’s what’s causing it.

    Updated to new version.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Errors’ is closed to new replies.