• Resolved buddywhatshisname

    (@vhmarkgmailcom)


    If you are running cron via the linux command line there’s a PHP error log notice + warning that show up (try it with debug mode enabled and look in wp-content/debug.log).

    • PHP Notice: Undefined index: REQUEST_METHOD in …/wp-content/plugins/wordfence/lib/wfCache.php on line 41
    • PHP Warning: inet_pton(): Unrecognized address in …/wp-content/plugins/wordfence/lib/wfUtils.php on line 126

    The cause, I think, is b/c on our server for these CLI requests, $_SERVER[‘REMOTE_ADDR’] is not populated.

    To run cron via CLI, edit wp-config.php and set
    define(‘DISABLE_WP_CRON’, true);
    then launch cron via
    /path/to/bin/php -c /path/to/php.ini /path/to/wp-cron.php

    Can you please add isset() checks so my logs are not so polluted?

    Thanks!

    https://wordpress.org/plugins/wordfence/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘CLI cron PHP warning notice’ is closed to new replies.