Unable to run custom function
-
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 500and 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 ?
- The topic ‘Unable to run custom function’ is closed to new replies.