Title: CLI cron PHP warning   notice
Last modified: August 30, 2016

---

# CLI cron PHP warning notice

 *  Resolved [buddywhatshisname](https://wordpress.org/support/users/vhmarkgmailcom/)
 * (@vhmarkgmailcom)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/cli-cron-php-warning-notice/)
 * 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/](https://wordpress.org/plugins/wordfence/)

Viewing 1 replies (of 1 total)

 *  [WFBrian](https://wordpress.org/support/users/wfbrian/)
 * (@wfbrian)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/cli-cron-php-warning-notice/#post-6359534)
 * Hi,
 * I’ll pass this along. Thanks for the suggestion!
 * -Brian

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WFBrian](https://wordpress.org/support/users/wfbrian/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/cli-cron-php-warning-notice/#post-6359534)
 * Status: resolved