I get this error in Apache. IIS doesn't tell me that curl_init() is not defined.

An error occurred . /drupal6/batch?id=8&op=do <br /> <b>Fatal error</b>: Call to undefined function curl_init() in <b>\drupal6\sites\all\modules\simpletest\drupal_web_test_case.php</b> on line <b>784</b><br /> 

If the curl library is a requirement we should have a requirement check for this.

Comments

boombatower’s picture

It is required...I thought it checked..hmm.

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

There is a check in the installer.

$has_curl = function_exists('curl_init');

Not sure how you installed it.

hass’s picture

I have installed simpletest 1.x long time ago... then changed to 2.1, 2.3 and now to 2.5. Only for testing purposes I've switched from IIS to Apache as simpeltest isn't working for me at all any more. But you have pointed out - you are only checking on install time and I switched over the webserver afterwards installation. Maybe you can not check this not only on install time.

boombatower’s picture

It is actually checked during both phases.

  switch ($phase) {
    case 'runtime':
      $requirements['simpletest_curl'] = array(
        'title' => $t('cURL'),
        'value' => $has_curl ? $t('Enabled') : $t('Not found'),
        'severity' => $has_curl ? REQUIREMENT_OK : REQUIREMENT_ERROR,
      );
      break;
    case 'install':
      if (!$has_curl) {
        $requirements['simpletest_curl'] = array(
          'title' => $t('cURL'),
          'severity' => REQUIREMENT_ERROR,
          'description' => $t('Simpletest could not be installed because the PHP <a href="!curl_url">cURL</a> library is not available.', array('!curl_url' => 'http://php.net/manual/en/curl.setup.php')),
        );
      }
      break;
  }

If you visit admin/reports/status a cURL requirement. Either way please try install cURL and the PHP plugin and report back your findings.

hass’s picture

Well while reviewing I saw it 30 minutes ago... but I haven't opened "admin" and the status page what have made this requirement hidden to me on Apache try.

hass’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closing - the checks exists, but I circumvented the checks.