Countdown module requires curl, but doesn't intelligently say so
Bug #458941 reported by
Tony Yarusso
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UD Countdown |
Fix Released
|
Undecided
|
Michael Lustfield |
Bug Description
If this module is used on a stock Ubuntu LAMP setup, running Drupal's cron script will fail. The result is a white screen with a PHP error, "call to undefined function curl_init() on line 140 of drupal.module". After installing the php5-curl package and restarting apache, it works.
Fixes:
Either there's something in the code that should check for this and behave another way if it can in fact survive without curl, or
It needs to fail gracefully by refusing to install properly in Drupal initially, explaining that the php5-curl package is necessary for it to run.
Changed in ubuntu-drupal-countdown: | |
assignee: | Pierre Buyle (mongolito404) → Michael Lustfield (mtecknology) |
status: | Confirmed → In Progress |
To post a comment you must log in.
Availability of curl could be check in hook_requiremen ts[1] with something like
$t = get_t();
$requirements = array();
$curl_version = function_ exists( 'curl_version' ) ? curl_version() : false; 'udrc_curl' ] = array(
$requirements[
'title' => $t('cURL'),
'value' => $curl_version,
'description' => $('The Ubuntu Drupal Release Countdown module requires the cURL library.'),
'severity ' => $curl_version === false ? REQUIREMENT_ERROR : REQUIREMENT_INFO
);
[1] http:// api.drupal. org/api/ function/ hook_requiremen ts/6