diff --git a/ChangeLog b/ChangeLog index 2e04a4f4b..503b1adaf 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-06-28 Steve Alberty + * fixed bug with dl and PHP 3 + 2001-06-27 Marc Delisle * add function tbl_name() to protect table names like 00001_Files * bug 434608: support db names with special characters (MySQL >= 3.23.6) diff --git a/lib.inc.php3 b/lib.inc.php3 index c42c3f628..c435852c5 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -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; }