From 3e2bc6a975303bfb1ac656c5431d30c4aae82289 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 22 Sep 2009 07:11:38 +0000 Subject: - Fix dl() use in installer (#1486150): use is_readable() instead --- installer/check.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'installer/check.php') diff --git a/installer/check.php b/installer/check.php index 9bdb41ba5..459305138 100644 --- a/installer/check.php +++ b/installer/check.php @@ -55,14 +55,17 @@ if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '>=')) {

Checking PHP extensions

The following modules/extensions are required to run RoundCube:

$ext) { if (extension_loaded($ext)) { $RCI->pass($name); } else { - $_ext = $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; - $msg = @dl($_ext) ? 'Could be loaded. Please add in php.ini' : ''; + $_ext = $ext_dir . '/' . $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; + $msg = @is_readable($_ext) ? 'Could be loaded. Please add in php.ini' : ''; $RCI->fail($name, $msg, $source_urls[$name]); } echo '
'; @@ -78,8 +81,8 @@ foreach ($optional_php_exts AS $name => $ext) { $RCI->pass($name); } else { - $_ext = $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; - $msg = @dl($_ext) ? 'Could be loaded. Please add in php.ini' : ''; + $_ext = $ext_dir . '/' . $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; + $msg = @is_readable($_ext) ? 'Could be loaded. Please add in php.ini' : ''; $RCI->na($name, $msg, $source_urls[$name]); } echo '
'; @@ -99,8 +102,8 @@ foreach ($supported_dbs AS $database => $ext) { $RCI->pass($database); } else { - $_ext = $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; - $msg = @dl($_ext) ? 'Could be loaded. Please add in php.ini' : 'Not installed'; + $_ext = $ext_dir . '/' . $prefix . $ext . '.' . PHP_SHLIB_SUFFIX; + $msg = @is_readable($_ext) ? 'Could be loaded. Please add in php.ini' : 'Not installed'; $RCI->na($database, $msg, $source_urls[$database]); } echo '
'; -- cgit v1.2.3