diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-07 05:34:21 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-07 05:34:21 +0000 |
commit | 1b8b2f512c250383c2c5f0cb37223f09c40a8017 (patch) | |
tree | ba3f4c5b9a7a77dcc7bf7a408c42722705fb336f /modules/simpletest | |
parent | f562e86581faa0cc3da859cebb185b2c52b179da (diff) | |
download | brdo-1b8b2f512c250383c2c5f0cb37223f09c40a8017.tar.gz brdo-1b8b2f512c250383c2c5f0cb37223f09c40a8017.tar.bz2 |
#323110 by nenne, gpk, and sun: Add requirement check for open_basedir() restriction in SimpleTest.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/simpletest.install | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/simpletest/simpletest.install b/modules/simpletest/simpletest.install index 0aab17e1c..31827d9e9 100644 --- a/modules/simpletest/simpletest.install +++ b/modules/simpletest/simpletest.install @@ -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'), @@ -65,6 +66,18 @@ function simpletest_requirements($phase) { $requirements['php_domdocument']['description'] =t('SimpleTest requires the DOMDocument class to be available. Please check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', 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 http://drupal.org/node/674304. + $requirements['php_open_basedir'] = array( + 'title' => $t('PHP open_basedir restriction'), + 'value' => $open_basedir ? $t('Enabled') : $t('Disabled'), + ); + if ($open_basedir) { + $requirements['php_open_basedir']['severity'] = REQUIREMENT_ERROR; + $requirements['php_open_basedir']['description'] = t('The testing framework requires the PHP <a href="@open_basedir-url">open_basedir</a> restriction to be disabled. Please check your webserver configuration or contact your web host.', array('@open_basedir-url' => 'http://php.net/manual/en/ini.core.php#ini.open-basedir')); + } + return $requirements; } |