From e505c393f05c7cb3a7278209cfaa23e73f758166 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 9 Jul 2003 09:02:41 +0000 Subject: [PATCH] $cfg['OBGzip'] = 'auto' created and set to default. --- ChangeLog | 7 +++++++ Documentation.html | 8 ++++++-- config.inc.php3 | 2 +- header.inc.php3 | 1 + libraries/common.lib.php3 | 9 +++++++++ libraries/config_import.lib.php3 | 2 +- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f89cc4b5..e930cd45c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,13 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-07-09 Garvin Hicking + * Documentation.html, config.inc.php3, libraries/common.lib.php3, + libraries/config_import.lib.php3, header.inc.php3: Created auto-detection + for $cfg['OBGzip'] and set this as default. It will auto-enable OBGzip + for all browsers except IE6.x. Created a meta-header to identify which + setting is used, to make our debugging of bugreports easier. + 2003-07-08 Garvin Hicking * tbl_query_box.php3, footer.inc.php3: Removed any 'top.' DOM reference. This enables phpMyAdmin to be used within a frameset without trying diff --git a/Documentation.html b/Documentation.html index 2b7633ed2..c0d15547f 100755 --- a/Documentation.html +++ b/Documentation.html @@ -995,10 +995,14 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

-
$cfg['OBGzip'] boolean
+
$cfg['OBGzip'] string/boolean
Defines whether to use GZip output buffering for increased - speed in HTTP transfers. + speed in HTTP transfers.
+ Set to true/false for enabling/disabling. When set to 'auto' (string), + phpMyAdmin tries to enable output buffering and will automatically disable + it, if your browser has some problems with buffering. IE6 with a certain patch + is known to cause data corruption having enabled buffering.

diff --git a/config.inc.php3 b/config.inc.php3 index a4dcbb92d..f91c55d43 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -188,7 +188,7 @@ unset($cfg['Servers'][0]); /** * Other core phpMyAdmin settings */ -$cfg['OBGzip'] = TRUE; // use GZIP output buffering if possible +$cfg['OBGzip'] = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto') $cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database $cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit) $cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show diff --git a/header.inc.php3 b/header.inc.php3 index 26776446e..a52c7e45c 100755 --- a/header.inc.php3 +++ b/header.inc.php3 @@ -111,6 +111,7 @@ var errorMsg2 = ' + diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index b57f3dbd9..b4070bea6 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -240,6 +240,15 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} || (PMA_PHP_INT_VERSION >= 40005 && @ini_get('zlib.output_compression'))) { $cfg['OBGzip'] = FALSE; } + + // disable output-buffering (if set to 'auto') for IE6, else enable it. + if (strtolower($cfg['OBGzip']) == 'auto') { + if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER < 7) { + $cfg['OBGzip'] = FALSE; + } else { + $cfg['OBGzip'] = TRUE; + } + } if ($is_minimum_common == FALSE) { /** diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index 5c6f904ac..cc11123b3 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -206,7 +206,7 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) { $cfg['OBGzip'] = $cfgOBGzip; unset($cfgOBGzip); } else { - $cfg['OBGzip'] = TRUE; + $cfg['OBGzip'] = 'auto'; } }