fixed dl bug

This commit is contained in:
Steve Alberty
2001-06-28 17:37:42 +00:00
parent d9e1444df5
commit 51a4f28079
2 changed files with 7 additions and 2 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-06-28 Steve Alberty <alberty@neptunlabs.de>
* fixed bug with dl and PHP 3
2001-06-27 Marc Delisle <lem9@users.sourceforge.net>
* add function tbl_name() to protect table names like 00001_Files
* bug 434608: support db names with special characters (MySQL >= 3.23.6)

View File

@@ -9,8 +9,10 @@ if(!defined("__LIB_INC__")){
// load the mysql extensions or not - staybyte - 26. June 2001
if (defined("PHP_OS") && eregi("win", PHP_OS)) $suffix=".dll";
else $suffix=".so";
if (!extension_loaded("mysql") && !get_cfg_var("safe_mode")) @dl("mysql".$suffix);
if (!extension_loaded("mysql")){
if (intval(phpversion())==3) $extension="MySQL";
else $extension="mysql";
if (!extension_loaded($extension) && !get_cfg_var("safe_mode")) @dl($extension.$suffix);
if (!extension_loaded($extension)){
echo $strCantLoadMySQL;
exit;
}