--- modules/simpletest/simpletest.install.1.30 Mon Jan 04 22:56:49 2010
+++ modules/simpletest/simpletest.install Mon Jan 04 23:21:44 2010
@@ -38,6 +38,7 @@ function simpletest_requirements($phase)
$has_curl = function_exists('curl_init');
$has_hash = function_exists('hash_hmac');
$has_domdocument = class_exists('DOMDocument');
+ $open_basedir = ini_get('open_basedir');
$requirements['curl'] = array(
'title' => $t('cURL'),
@@ -63,6 +64,18 @@ function simpletest_requirements($phase)
if (!$has_domdocument) {
$requirements['php_domdocument']['severity'] = REQUIREMENT_ERROR;
$requirements['php_domdocument']['description'] =t('SimpleTest requires the DOMDocument class to be available. Please check the configure command at the PHP info page.', array('@link-phpinfo' => url('admin/reports/status/php')));
+ }
+
+ // SimpleTest currently needs 2 cURL options which are incompatible with
+ // having PHP's open_basedir restriction set.
+ // See also http://drupal.org/node/674304.
+ $requirements['php_open_basedir'] = array(
+ 'title' => $t('PHP open_basedir value'),
+ 'value' => $open_basedir ? $t('Set') : $t('Not set'),
+ );
+ if ($open_basedir) {
+ $requirements['php_open_basedir']['severity'] = REQUIREMENT_ERROR;
+ $requirements['php_open_basedir']['description'] = t('SimpleTest requires the PHP open_basedir restriction to be disabled. Please check your webserver configuration or contact your web host.', array('@open_basedir-url' => url('http://php.net/manual/en/ini.core.php#ini.open-basedir')));
}
return $requirements;