From 1bb107dc8cf94ac9672337851e9bf2979b1476b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 8 Jan 2003 14:17:54 +0000 Subject: [PATCH] extra check for MySQL even when in safe mode --- ChangeLog | 2 ++ libraries/common.lib.php3 | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3712ca1f9..de4269377 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * libraries/url_generating.lib.php3, libraries/common.lib.php3: New URL and hidden input generating stuff. * almost all php3 files: Use new URL and hidden input generation stuff. + * libraries/common.lib.php3: Addded extra check for MySQL even when in + safe mode (could fix #661949). 2003-01-08 Alexander M. Turek * lang/english-*.inc.php3: Fixed a typo. diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 9a9ce2f68..bef5f1b85 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -223,6 +223,14 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} } } // end load mysql extension + // check whether mysql is available + if (!@function_exists('mysql_connect')) { + echo $strCantLoadMySQL . '
' . "\n" + . '' . $GLOBALS['strDocu'] . '' . "\n"; + exit(); + } + + /** * Add slashes before "'" and "\" characters so a value containing them can