Title: A PHP Warning when the cron is started with php command
Last modified: January 14, 2022

---

# A PHP Warning when the cron is started with php command

 *  Resolved [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/)
 * Hi, a little warning that anyway does not affect the correct functioning. When
   the wp-cron.php is triggered using the php command (and not an http call) this
   warning is recorded:
 *     ```
       PHP Warning:  Undefined array key "SERVER_PROTOCOL" in .../wp-content/plugins/awesome-support/includes/functions-general.php on line 202
       PHP Warning:  Undefined array key "SERVER_NAME" in .../wp-content/plugins/awesome-support/includes/functions-general.php on line 203
       PHP Warning:  Undefined array key "SERVER_PORT" in .../wp-content/plugins/awesome-support/includes/functions-general.php on line 203
       ```
   
 * with PHP 8.0.
 * Bye, Stefano.

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

 *  [sademhaj](https://wordpress.org/support/users/jahmedas/)
 * (@jahmedas)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15274499)
 * Hi [@satollo](https://wordpress.org/support/users/satollo/)
 * Thank you for sharing the details. Can you please check if you are using the 
   latest version of awesome support v6.0.12? If not please update and share the
   version you are using to investigate it.
 * Regards
 *  Thread Starter [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15287262)
 * Hi, sorry for this late follow-up: yes we’re using the latest version.
 * Stefano.
 *  Plugin Author [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * (@yeisonbp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15313412)
 * Hi [@satollo](https://wordpress.org/support/users/satollo/),
 * We released a patch update. Let us know if this solves your issue.
 * Best Regards.
 *  Thread Starter [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15313893)
 * Thanks!
 *  Thread Starter [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15331187)
 * Hi, the warning is still there. You probably added the check on “is_cli()”, but
   the wp-cron.php can be triggered using a simple “php” command line command. You
   should even check the presence of $_SERVER value like:
 * } elseif ( wpas_is_wp_cli() || empty($_SERVER[‘SERVER_NAME’])) {
 * on functions-general.php.
 * Thanks!
 *  Plugin Author [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * (@yeisonbp)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15348143)
 * Hi [@satollo](https://wordpress.org/support/users/satollo/),
 * I sent a report to the developers to apply the fix to PHP 8.0 version to fix 
   it in an upcoming release.
 * Thanks!

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

The topic ‘A PHP Warning when the cron is started with php command’ is closed to
new replies.

 * ![](https://ps.w.org/awesome-support/assets/icon-256x256.png?rev=1849681)
 * [Awesome Support - WordPress HelpDesk & Support Plugin](https://wordpress.org/plugins/awesome-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-support/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-support/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/a-php-warning-when-the-cron-is-started-with-php-command/#post-15348143)
 * Status: resolved