• Resolved Olv1do

    (@olv1do)


    Hey there – first of all very nice and useful plugin.

    I am trying to add a function to run the postie plugin.

    The postie plugin is activated by following the simple link (you can do it manually by simply going to it via any browser)

    I added the following comand

    function postie_cronjob_action () {
    $ch = curl_init(‘https://site_address/?postie=get-mail’);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: text/html’));
    curl_exec($ch);
    } add_action(‘postie_cronjob_action’, ‘postie_cronjob_action’);

    This allowed me to add the postie_cronjob_action to the cron list, once i try to run it i get the

    The page_address page isn’t working
    page_address is currently unable to handle this request.
    error 500

    and the error.log shows:

    PHP Fatal error: Call to undefined function curl_init() in /var/www/html/wp-content/plugins/cronjob-scheduler/cronjobs.php on line 4

    How come the curl function is undefined ?

    https://www.ads-software.com/plugins/cronjob-scheduler/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author chrispage1

    (@chrispage1)

    Hi Olv1do,

    I wish I could help more but this is something that your server admin would need to fix – it seems that the PHP cURL library is not installed (https://php.net/manual/en/book.curl.php).

    The cronjob scheduler plugin would have no bearing on whether curl_init() is defined or not. If you enjoy the plugin please do leave a review and thanks for the kind words!

    Chris.

    Thread Starter Olv1do

    (@olv1do)

    Hi there!

    Thanks for the info I think you are absolute correct on this.

    Just spoke with my admin – they will add this shortly.

    Plugin Author chrispage1

    (@chrispage1)

    Hi Olv1do,

    Great – pleased I could help! Enjoy the plugin and feel free to leave a review if you like it ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to run custom function’ is closed to new replies.