From 8cc6de4de37cc37c55db06bf685ff3fb93a48bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 20 Feb 2017 09:19:22 +0100 Subject: [PATCH 1/3] Remove ServerLibraryDifference_DisableWarning setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is getting more and more problematic these days as most of Linux distributions ship MariaDB libraries, while many people run MySQL servers. As MariaDB claims the protocol compatibility should stay, we should not warn in this case. Of course there is option to add this exception to the warning (so far the exception is there only other way - when using MySQL libraries to connect to MariaDB server), but we would be ignoring most cases already and I think complete removal is better than adding exceptions. Overall I don't think this warning is doing any good these days. Signed-off-by: Michal Čihař --- doc/config.rst | 4 ++ index.php | 42 --------------------- libraries/config.default.php | 8 ---- libraries/config/messages.inc.php | 6 --- libraries/config/setup.forms.php | 1 - libraries/config/user_preferences.forms.php | 1 - 6 files changed, 4 insertions(+), 58 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index 2f6a22336a..c60891b52d 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -108,6 +108,10 @@ Basic settings :type: boolean :default: false + .. deprecated:: 4.7.0 + + This setting was removed as the warning has been removed as well. + A warning is displayed on the main page if there is a difference between the MySQL library and server version. diff --git a/index.php b/index.php index f33a0b44c9..816ad7bf58 100644 --- a/index.php +++ b/index.php @@ -574,48 +574,6 @@ if ($server > 0) { } // end if } -/** - * Warning about different MySQL library and server version - * (a difference on the third digit does not count). - * If someday there is a constant that we can check about mysqlnd, - * we can use it instead of strpos(). - * If no default server is set, $GLOBALS['dbi'] is not defined yet. - * We also do not warn if MariaDB is detected, as it has its own version - * numbering. - */ -if (isset($GLOBALS['dbi']) - && $cfg['ServerLibraryDifference_DisableWarning'] == false -) { - $_client_info = $GLOBALS['dbi']->getClientInfo(); - if ($server > 0 - && mb_strpos($_client_info, 'mysqlnd') === false - && mb_strpos(PMA_MYSQL_STR_VERSION, 'MariaDB') === false - && substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr( - PMA_MYSQL_INT_VERSION, 0, 3 - ) - ) { - trigger_error( - Sanitize::sanitize( - sprintf( - __( - 'Your PHP MySQL library version %s differs from your ' . - 'MySQL server version %s. This may cause unpredictable ' . - 'behavior.' - ), - $_client_info, - substr( - PMA_MYSQL_STR_VERSION, - 0, - strpos(PMA_MYSQL_STR_VERSION . '-', '-') - ) - ) - ), - E_USER_NOTICE - ); - } - unset($_client_info); -} - /** * Warning about Suhosin only if its simulation mode is not enabled */ diff --git a/libraries/config.default.php b/libraries/config.default.php index a9abf5defa..061ee88bf6 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -61,14 +61,6 @@ $cfg['SuhosinDisableWarning'] = false; */ $cfg['LoginCookieValidityDisableWarning'] = false; -/** - * Disable the default warning that is displayed if a difference between - * the MySQL library and server is detected. - * - * @global boolean $cfg['['ServerLibraryDifference_DisableWarning']'] - */ -$cfg['ServerLibraryDifference_DisableWarning'] = false; - /** * Disable the default warning about MySQL reserved words in column names * diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index cbf973478d..e39ed2ac1b 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -568,12 +568,6 @@ $strConfigPmaNoRelation_DisableWarning_desc = __( ); $strConfigPmaNoRelation_DisableWarning_name = __('Missing phpMyAdmin configuration storage tables'); -$strConfigServerLibraryDifference_DisableWarning_desc = __( - 'Disable the default warning that is displayed if a difference between the ' - . 'MySQL library and server is detected.' -); -$strConfigServerLibraryDifference_DisableWarning_name - = __('Server/library difference warning'); $strConfigReservedWordDisableWarning_desc = __( 'Disable the default warning that is displayed on the Structure page if column ' . 'names in a table are reserved MySQL words.' diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 2e1d6fb2c3..d308664b9f 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -117,7 +117,6 @@ $forms['Features']['Page_titles'] = array( 'TitleDatabase', 'TitleServer'); $forms['Features']['Warnings'] = array( - 'ServerLibraryDifference_DisableWarning', 'PmaNoRelation_DisableWarning', 'SuhosinDisableWarning', 'LoginCookieValidityDisableWarning'); diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 09bb547257..650a2ad718 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -53,7 +53,6 @@ $forms['Features']['Page_titles'] = array( 'TitleDatabase', 'TitleServer'); $forms['Features']['Warnings'] = array( - 'ServerLibraryDifference_DisableWarning', 'PmaNoRelation_DisableWarning', 'SuhosinDisableWarning', 'LoginCookieValidityDisableWarning', From 56297ffecca5586685cad8cb238f595cce289074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 20 Feb 2017 10:17:52 +0100 Subject: [PATCH 2/3] Remove token from GET request while changing theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/ThemeManager.php | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/ThemeManager.php b/libraries/ThemeManager.php index b80d9673ef..18de556ead 100644 --- a/libraries/ThemeManager.php +++ b/libraries/ThemeManager.php @@ -369,7 +369,6 @@ class ThemeManager if ($form) { $select_box .= '
Date: Tue, 21 Feb 2017 09:13:18 +0100 Subject: [PATCH 3/3] Changelog entry for issue #13020 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ac8e8829a0..7f871b111b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,7 @@ phpMyAdmin - ChangeLog - issue #13002 Fixed OpenDocument exports - issue #13000 Align NULL values according to the column alignment - issue #13021 Show phpMyAdmin errors even with error_reporting set to 0 +- issue #13020 Removed warning about client and server versions mismatch 4.6.6 (2017-01-23) - issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'