Support » Plugin: AJAX Heartbeat Tool » Error when running cron script

  • Resolved elmills81

    (@elmills81)


    I just installed the plugin a couple hours ago and it is doing exactly what is expected. Improved a performance/connection issue I was having dramatically.

    However, I just noticed this in my cron logs, when I call wp-cron.php from the command line this occurs:
    Fatal error: Call to undefined function get_called_class() in /home/rcovenant/webapps/rccnew/wp-content/plugins/ajax-heartbeat-tool/plugin.php on line 76

    https://wordpress.org/plugins/ajax-heartbeat-tool/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikel King

    (@vizkr)

    Hey elmills81,

    Thanks for reporting that. I do not use wp-cron on any of my systems and have never seen an error like that with ‘real’ cron, so I will have to investigate further.

    Mikel King

    Maybe I am doing something wrong then and not following the expected process. Below is the cron job I am running

    */15 * * * * wget -O -q -t 1 http://rccnew.rcovenant.org/wp-cron.php >$HOME/Cronlogs/cron.log 2>&1

    If I am using cron incorrectly and that is the issue, my apologies for wasting your time.

    Thanks for the response.

    Plugin Author Mikel King

    (@vizkr)

    Hey elmills81,

    Check the version of PHP you are running on your cli system.
    The get_called_class() function is only supported in PHP 5.3 and newer.

    Plugin Author Mikel King

    (@vizkr)

    I have refactored the plugin to eliminate the get_called_class() function entirely.

    elmills81

    (@elmills81)

    My apologies for not coming back to update my case. I was working on a website conversion and forgot to come back and update my result.

    You are correct that it was an issue with my hosts version of PHP and the cli. I upgraded the PHP version before we deployed and that fixed this issue (and several others).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error when running cron script’ is closed to new replies.