Title: cron jobs causing php errors
Last modified: October 15, 2020

---

# cron jobs causing php errors

 *  Resolved [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/)
 * Repeatedly errors were appearing in my php error log, like this:
 *     ```
       [15-Oct-2020 22:26:00] WARNING: [pool example.com] child 3338 said into stderr: "NOTICE: PHP message: PHP Warning: session_start(): Cannot start session when headers already sent in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/whmcs-bridge-sso/includes/hooks.inc.php on line 0"
   
       [15-Oct-2020 22:26:00] WARNING: [pool example.com] child 3338 said into stderr: "NOTICE: PHP message: PHP Warning: session_start(): Cannot start session when headers already sent in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/whmcs-bridge/bridge.init.php on line 973"
   
       [15-Oct-2020 22:26:00] WARNING: [pool example.com] child 3338 said into stderr: "NOTICE: PHP message: PHP Warning: Cannot modify header information - headers already sent in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/zero-spam/classes/class-wpzerospam.php on line 938"
       ```
   
 * Normally such errors are caused when visitors (or admins) access the site, and
   some plugin is causing output through white space at start of file. So at first
   I thought that there may be some log buffering going on somewhere, as the error
   messages did not correspond to my visiting the site. But finally I traced it 
   to this plugin: Using “WP Crontrol” I manually started some of the “bdt” cron
   jobs – and zack there were the error messages in the log. Every time.
 * Could you look into this please and clean it up?
 * Thanks, Tim

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

 *  [wordpresstikweb](https://wordpress.org/support/users/abdultikweb/)
 * (@abdultikweb)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/#post-13541614)
 * [@tim-reeves](https://wordpress.org/support/users/tim-reeves/)
    We are going 
   to check the issue. Thank you for informing us.
 *  Thread Starter [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/#post-13542909)
 * Having looked deeper into this: Whenever ANY wp-cron job is run, the PHP errors
   happen. Since wp-cron jobs run when due *at the end of a page display call*, 
   then the functions hooked as scheduled events may not do things like starting
   a session or sending headers, as they have nothing to do with the GUI. But some
   naughty plugins seem to be doing exactly that:
 * o WHMCS Bridge Free
    o WHMCS Bridge Pro o WordPress Zero Spam
 * WHMCS Bridge Pro is encoded, but I’ll be looking at the code of the other two
   now.
 * So obviously this is not any problem with your plugin – sorry for the false alarm.
 * Tim
 *  Thread Starter [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/#post-13542974)
 * BTW I believe you may not be removing wp-cron jobs on deactivation via wp_clear_scheduled_hook…
   
   See [https://wpshout.com/wp_schedule_event-examples/](https://wpshout.com/wp_schedule_event-examples/)
 *  Thread Starter [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/#post-13543808)
 * More info for anyone interested:
 * [https://github.com/bmarshall511/wordpress-zero-spam/issues/229](https://github.com/bmarshall511/wordpress-zero-spam/issues/229)

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

The topic ‘cron jobs causing php errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bounce-handler-mailpoet_cb522b.svg)
 * [Bounce Handler MailPoet 3](https://wordpress.org/plugins/bounce-handler-mailpoet/)
 * [Support Threads](https://wordpress.org/support/plugin/bounce-handler-mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/bounce-handler-mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bounce-handler-mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bounce-handler-mailpoet/reviews/)

## Tags

 * [PHP errors](https://wordpress.org/support/topic-tag/php-errors/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/cron-jobs-causing-php-errors/#post-13543808)
 * Status: resolved