From f350e7703f5cc043ca148fa62e5d1e02589aa8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 12 Sep 2013 09:46:45 +0200 Subject: [PATCH 1/3] bug #3997 Error handling in case MySQL extension is missing We can not work with Response object before loading DBI as it uses it. --- ChangeLog | 1 + libraries/common.inc.php | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index adc699ba4f..f9039d847a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug Handle the situation where PHP_SELF is not set - bug #4080 Overwrite existing file not obeyed - bug #3929 Database-specific privileges are not copied when cloning user +- bug #3997 Error handling in case MySQL extension is missing 4.0.6.0 (2013-09-05) - bug #4036 Call to undefined function mb_detect_encoding (clarify the doc) diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 3f1f506c6b..46d8eb107a 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -32,7 +32,7 @@ */ /** - * block attempts to directly run this script + * block attempts to directly run this script */ if (getcwd() == dirname(__FILE__)) { die('Attack stopped'); @@ -749,11 +749,6 @@ if (@file_exists($_SESSION['PMA_Theme']->getLayoutFile())) { } if (! defined('PMA_MINIMUM_COMMON')) { - if (! defined('PMA_BYPASS_GET_INSTANCE')) { - // get a dummy object to ensure that the class is instanciated - PMA_Response::getInstance(); - } - /** * Character set conversion. */ From 9cc58463410dd8d1d0629d8949a16e79f22bc691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 12 Sep 2013 09:53:06 +0200 Subject: [PATCH 2/3] Fix URL redirector in case of fatal erorrs --- url.php | 1 + 1 file changed, 1 insertion(+) diff --git a/url.php b/url.php index f3954ff1db..897f3529b9 100644 --- a/url.php +++ b/url.php @@ -9,6 +9,7 @@ /** * Gets core libraries and defines some variables */ +define('PMA_MINIMUM_COMMON', True); require_once './libraries/common.inc.php'; if (! PMA_isValid($_GET['url']) From 13e546f5884b81bd7af7f56b0ed90466724460c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 12 Sep 2013 09:56:11 +0200 Subject: [PATCH 3/3] Fixed display of link to documentation --- libraries/database_interface.lib.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 439f15cd42..7a1133dac6 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -58,6 +58,12 @@ if (defined('TESTSUITE')) { // if it fails try alternative extension ... // and display an error ... + $docurl = PMA_Util::getDocuLink('faq', 'faqmysql'); + $doclink = sprintf( + __('See %sour documentation%s for more information.'), + '[a@' . $docurl . '@documentation]', + '[/a]' + ); /** * @todo add different messages for alternative extension @@ -66,7 +72,7 @@ if (defined('TESTSUITE')) { PMA_warnMissingExtension( $GLOBALS['cfg']['Server']['extension'], false, - PMA_Util::showDocu('faq', 'faqmysql') + $doclink ); if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') { @@ -80,7 +86,7 @@ if (defined('TESTSUITE')) { PMA_warnMissingExtension( $GLOBALS['cfg']['Server']['extension'], true, - PMA_Util::showDocu('faq', 'faqmysql') + $doclink ); }