summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-22 07:11:38 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-22 07:11:38 +0000
commit9c86a70084d2d79a2262c89d6fb5ff3c01b34830 (patch)
tree00e0ac2ea51ca31e80829bca9bbd1288886ebc8f
parent421c773a8e5e7784f65a29f837cce6144485f94c (diff)
- Fix dl() use in installer (#1486150): use is_readable() instead
git-svn-id: https://svn.roundcube.net/trunk@2977 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/installer/check.php17
2 files changed, 11 insertions, 7 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 5903fe9cc..995253564 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Fix dl() use in installer (#1486150)
- Added 'ldap_debug' option
- Fix "Empty startup greeting" bug (#1486085)
- Fix setting user name in 'new_user_identity' plugin (#1486137)
diff --git a/roundcubemail/installer/check.php b/roundcubemail/installer/check.php
index 9bdb41ba5..459305138 100644
--- a/roundcubemail/installer/check.php
+++ b/roundcubemail/installer/check.php
@@ -55,14 +55,17 @@ if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '>=')) {
<h3>Checking PHP extensions</h3>
<p class="hint">The following modules/extensions are <em>required</em> to run RoundCube:</p>
<?php
-
+
+// get extensions location
+$ext_dir = ini_get('extension_dir');
+
$prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
foreach ($required_php_exts AS $name => $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 '<br />';
@@ -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 '<br />';
@@ -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 '<br />';