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: 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ř --- index.php | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'index.php') 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 */ -- cgit v1.2.3