Index: trunk/phase3/config/index.php |
— | — | @@ -295,7 +295,7 @@ |
296 | 296 | $phpdatabases = array(); |
297 | 297 | foreach (array_keys($ourdb) as $db) { |
298 | 298 | $compname = $ourdb[$db]['compile']; |
299 | | - if (extension_loaded($compname) or dl($compname . '.' . PHP_SHLIB_SUFFIX)) { |
| 299 | + if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) { |
300 | 300 | array_push($phpdatabases, $db); |
301 | 301 | $ourdb[$db]['havedriver'] = 1; |
302 | 302 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -407,6 +407,8 @@ |
408 | 408 | * (bug 9026) Incorrect heading numbering when viewing Special:Statistics with |
409 | 409 | "auto-numbered headings" enabled |
410 | 410 | * Fixed invalid XHTML in Special:Upload |
| 411 | +* (bug 11013) Make sure dl() is available before attempting to use it to check |
| 412 | + available databases in installer |
411 | 413 | |
412 | 414 | == API changes since 1.10 == |
413 | 415 | |
Index: trunk/phase3/install-utils.inc |
— | — | @@ -124,4 +124,17 @@ |
125 | 125 | return $path; |
126 | 126 | } |
127 | 127 | |
128 | | -?> |
| 128 | +/** |
| 129 | + * Is dl() available to us? |
| 130 | + * |
| 131 | + * According to http://uk.php.net/manual/en/function.dl.php, dl() |
| 132 | + * is *not* available when `enable_dl` is off, or under `safe_mode` |
| 133 | + * |
| 134 | + * @return bool |
| 135 | + */ |
| 136 | +function mw_have_dl() { |
| 137 | + return function_exists( 'dl' ) |
| 138 | + && is_callable( 'dl' ) |
| 139 | + && ini_get( 'enable_dl' ) |
| 140 | + && !ini_get( 'safe_mode' ); |
| 141 | +} |
\ No newline at end of file |