diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/detect.php | 2 | ||||
-rw-r--r-- | examples/server/setup.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/detect.php b/examples/detect.php index 123e496..f745739 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -314,7 +314,7 @@ function detect_stores($r, &$out) $found = array(); foreach (array('sqlite', 'mysql', 'pgsql') as $dbext) { - if (extension_loaded($dbext) || (ini_get('enable_dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) { + if (extension_loaded($dbext) || (function_exists('dl') && @dl($dbext . '.' . PHP_SHLIB_SUFFIX))) { $found[] = $dbext; } } diff --git a/examples/server/setup.php b/examples/server/setup.php index e25ef34..0a42bff 100644 --- a/examples/server/setup.php +++ b/examples/server/setup.php @@ -176,19 +176,19 @@ function render_form() { $sqlite_found = false; if (extension_loaded('sqlite') || - @dl('sqlite.' . PHP_SHLIB_SUFFIX)) { + (function_exists('dl') && @dl('sqlite.' . PHP_SHLIB_SUFFIX))) { $sqlite_found = true; } $mysql_found = false; if (extension_loaded('mysql') || - @dl('mysql.' . PHP_SHLIB_SUFFIX)) { + (function_exists('dl') && @dl('mysql.' . PHP_SHLIB_SUFFIX))) { $mysql_found = true; } $pgsql_found = false; if (extension_loaded('pgsql') || - @dl('pgsql.' . PHP_SHLIB_SUFFIX)) { + (function_exists('dl') && @dl('pgsql.' . PHP_SHLIB_SUFFIX))) { $pgsql_found = true; } |