#323110: Remove the open_basedir requirement check is working round the incompatibility by making it a requirement for simpletest.module that open_basedir is not enabled.

As described at the top of that issue (see also the duplicate referenced at #1), fixing the incompatibility requires the following 2 curl options to be changed/handled differently:

CURLOPT_COOKIEJAR => NULL
CURLOPT_FOLLOWLOCATION => TRUE

Why bother?
Many shared hosts use open_basedir for security (typically when PHP is running as an Apache module), so adding open_basedir compatibility would hugely increase the number of Drupal users able to run tests.

Comments

mrharolda’s picture

Issue summary: View changes

CURLOPT_COOKIEJAR => NULL
CURLOPT_FOLLOWLOCATION => TRUE

When searching Drupal's codebase for these options, I only found these in drupal_web_test_case.php

// Some versions/configurations of cURL break on a NULL cookie jar, so
// supply a real file.
if (empty($this->cookieFile)) {
  $this->cookieFile = $this->public_files_directory . '/cookie.jar';
}

$curl_options = array(
  CURLOPT_COOKIEJAR => $this->cookieFile,
  CURLOPT_URL => $base_url,
  CURLOPT_FOLLOWLOCATION => FALSE,
  CURLOPT_RETURNTRANSFER => TRUE,
  CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on HTTPS.
  CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on HTTPS.
  CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
  CURLOPT_USERAGENT => $this->databasePrefix,
);

So ... is the requirement still needed?

David_Rothstein’s picture

Most likely this requirement is no longer needed (see #323110: Remove the open_basedir requirement check and #2926150: D7 Remove the open_basedir requirement check which propose removing it). Perhaps this issue can be closed as a duplicate and/or as outdated.

poker10’s picture

Status: Active » Closed (outdated)