Title: cron errors
Last modified: August 25, 2020

---

# cron errors

 *  Resolved [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/)
 * I’ve noticed that my error log files often contain lines such as this:
 * [Tue Aug 25 10:39:52.326098 2020] [fcgid:warn] [pid 26432] [client xx.yy.zz.ww:
   19075] mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach()
   in /home/domains/vol12/986/230289/user/htdocs/wp-cron.php on line 117, referer:
   [https://www.mydomain.com/wp-cron.php?doing_wp_cron=1598348391.7328090667724609375000](https://www.mydomain.com/wp-cron.php?doing_wp_cron=1598348391.7328090667724609375000)
 * in which only the argument changes, e.g.:
    ?doing_wp_cron=1598348391.7328090667724609375000
   successively reads: ?doing_wp_cron=1598348393.2930910587310791015625 ?doing_wp_cron
   =1598348395.3370800018310546875000 ?doing_wp_cron=1598348397.5089380741119384765625
   etc
 * A quick: grep -r “doing_wp_cron” * (in my htdocs folder) shows me that it’s only
   wppa that makes these calls (leaving out the results that refer to /wp-cron.php
   itself and to wp-includes/wp-cron.php):
 * wp-content/plugins/wp-photo-album-plus/wppa-cron.php: if ( isset( $_GET[‘doing_wp_cron’])){
   
   wp-content/plugins/wp-photo-album-plus/wppa-cron.php: return $_GET[‘doing_wp_cron’];
 * The odd thing is that I only get this on 1 of 3 sites where I use wppa, so it
   must be something to do with that particular wppa installation that’s different
   to the other 2.
 * Any tips you would send me to try?
 * serge

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

 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13316043)
 * Enable cron logging in Table IX-A9.1: Log Cron.
    Watch the wppa logfile in Table
   VIII-C1: List Logfile, and try to find any wppa log message at the same time 
   as the PHP warning.
 * Are the mailing list settings in Table IX-M identical in the different sites?
    -  This reply was modified 5 years, 9 months ago by [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/).
      Reason: Added question
 *  Thread Starter [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13316455)
 * Thanks for your suggestions, Jacob.
 * I enabled cron logging (IX-A9.1), cleared wppa logfile and examined it from VIII-
   C1, but while the errors flicked by every 1-2 minutes or so (in an ssh window
   with “tail -f ssl_errors.log”), the wppa log in VIII-C1 remains unaffected (reloading
   it every now and then), and only shows:
 * Cron: on:26.08.2020 11:24:40: [username]: wppa_clear_cache scheduled for run 
   in 10 sec.
    Obs: on:26.08.2020 11:24:40: [username]: WPPA cache cleared by class-
   wp-hook.php:287 wppa_ajax_callback()
 * Mailing list setting weren’t the same, the “faulty” site also had IX-M3 ticked,
   so I changed that. It had no apparent effect on the error messages.
 * I tried re-installing WP => no difference.
    I tried using WP-Crontrol plugin 
   to see what is happening, but I only get additional cron errors shown in my ssl_error.
   log, this time referring to wp-crontrol plugin.
 * Seen the above unchanging wppa log (VIII-C1) it looks like I’m barking up the
   wrong tree when thinking it might be wppa that causes these error log entries(?)
 * Time to get out the pipe and the magnifying glass and do some more sleuthing,
   I guess… hope my site isn’t being used to do something wonderful in the background,
   like mining bitcoins…
 *  Thread Starter [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13318298)
 * Putting my question differently:
    Will wppa work if I disable wp-cron? [i.e. 
   add “define(‘DISABLE_WP_CRON’, true);” to wp-config.php] Actually it does seem
   to work OK, but might wppa fall over itself after a while without the cron calls?
   That’s currently my only option to silence those pesky error messages.
 * My trouble is that said site is on a shared server where I have only reduced 
   options, e.g. no cpanel, no crontab, no access to /etc/… and without much support
   from the hosting co.
 * The droll thing is that I still see these errors even if all (yes incl. wppa)
   plugins are deactivated.
 * But I overstep the frame here … will wppa be stable with a disabled wp-cron?
 * Thanks,
    serge
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13322902)
 * Do not disable cron. You may temporarely for diagnostic purposes by using Table
   VIII-A0.
 * If cron does not run, you will loose:
    – the real deletion of trashed photos –
   updating the search index – sending mails – cleanup wppa internal cache – Updating
   treecounts (cached numbers of sub albums, photos etc. etc.) – Cleanup session
   db table and a few more less important actions.
 * Do you have more cron messages? you should see something like this in the wppa
   log:
 *     ```
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_cleanup completed.
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 15, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 14, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 13, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 12, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Deleted 0 tempfiles
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 11, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 10, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 9, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 8, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 7, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_cleanup creating pl htaccess.
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 6, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 5, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_cleanup reanimate cron.
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 4, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 3, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_cleanup cleanup sessions.
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 2, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: Phase 1, time left = 24
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_cleanup started.
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_clear_cache completed.
       Cron: on:27.08.2020 15:08:59: cron-job: Deleted 0 tempfiles
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_clear_cache started.
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_update_treecounts completed.
       Cron: on:27.08.2020 15:08:59: cron-job: Cron fixed treecounts for 2
       Cron: on:27.08.2020 15:08:59: cron-job: wppa_update_treecounts started.
       Cron: on:27.08.2020 14:55:33: 213.10.98.237: wppa_update_treecounts scheduled for run in 10 sec.
       Cron: on:27.08.2020 14:54:12: cron-job: wppa_update_treecounts completed.
       Cron: on:27.08.2020 14:54:12: cron-job: Cron fixed treecounts for 6
       Cron: on:27.08.2020 14:54:12: cron-job: Cron fixed treecounts for 2
       Cron: on:27.08.2020 14:54:12: cron-job: Cron fixed treecounts for 1
       Cron: on:27.08.2020 14:54:12: cron-job: wppa_update_treecounts started.
       ```
   
 * To my opinion you have a server problem; better move to a better hosting product
   or provider…
 *  Thread Starter [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13327257)
 * Thanks for your reply.
 * I ran the site for a while without wp-cron, but found that the wppa settings 
   table also advised me to switch it on.
 * I have asked my hosting provider to assist with this, as it clearly is not just
   a wppa issue, it even happens even when all plugins are de-activated.
 * I’ll mark this as “solved” for now – until such time as I have found an alternative
   host / my hosting co has moved me to a different server…
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13334644)
 * Is a wp bug, line 117 of wp-cron.php reads:
 * `foreach ( $cronhooks as $hook => $keys ) {`
 * this should read:
 * `if ( $cronhooks ) foreach ( $cronhooks as $hook => $keys ) {`
    or: `if ( is_array(
   $cronhooks ) ) foreach ( $cronhooks as $hook => $keys ) {`
 * this will prevent warning messages like:
 *     ```
       [Fri Aug 28 21:15:16.443167 2020] [fcgid:warn] [pid 62430] [client 77.68.64.25:32953] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /home/domains/vol3/578/2510578/user/htdocs/wp-cron.php on line 117, referer: https://www.pakohl.com/wp-cron.php?doing_wp_cron=1598645713.5858569145202636718750
       ```
   
 * when `$cronhooks` is `false`

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/cron-errors-3/#post-13334644)
 * Status: resolved