[Phpmyadmin-devel] Gzip HTTP Content-Encoding patch (the patch)

jeremy brand jeremy at nirvani.net
Mon Jul 23 00:46:41 CEST 2001


the patch.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: jeremy at nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/

On Mon, 23 Jul 2001, the following spilled from the mind of jeremy brand:

> Date: Mon, 23 Jul 2001 00:41:17 +0200 (WEDT)
> From: jeremy brand <jeremy at nirvani.net>
> To: phpmyadmin-devel at lists.sourceforge.net
> Subject: Re: [Phpmyadmin-devel] Gzip HTTP Content-Encoding patch
>
> Howdy :)
>
> I don't know what to do about this that makes sense.  This must be
> occuring if the footer is included, but the header is not. (should this
> scenerio even be happening?)
>
> I've added a $cfgOBGzip (boolean) to the config file.  The header and
> footer also check to see if this is true or false before doing the check
> for true or false on the $ob_mode.  This should _hopefully_ ellimitate
> this from happening.
>
> Jeremy
>
> Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: jeremy at nirvani.net
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>     "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>   Get your own Free, Private email at http://www.smackdown.com/
>
>
> > Oops:
> > Warning: Undefined variable: ob_mode in /usr/local/etc/www/si/php/phpMyAdmin/footer.inc.php3 on line
> > 7
> >
> > this is triggered when an ALTER TABLE does something wrong, for example setting a default value to a
> > BLOB field.
> >
> > Marc Delisle a écrit :
> > >
> > > Anyway I committed the patch to cvs, please give it a try!
> > >
> > > Marc
> >
> > _______________________________________________
> > Phpmyadmin-devel mailing list
> > Phpmyadmin-devel at lists.sourceforge.net
> > http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
> >
>
>
>
-------------- next part --------------
Index: config.inc.php3
===================================================================
RCS file: /cvsroot/phpmyadmin/phpMyAdmin/config.inc.php3,v
retrieving revision 1.10
diff -u -w -U6 -r1.10 config.inc.php3
--- config.inc.php3	2001/07/19 18:54:19	1.10
+++ config.inc.php3	2001/07/22 22:43:32
@@ -88,12 +88,15 @@
 $cfgSkipLockedTables = false;	// mark used tables, make possible to show locked tables (since 3.23.30)
 
 $cfgDefaultLang = "en";  		// default language to use, if not browser-defined or user-defined
 // $cfgLang = "en";  			// force: always use this language - must be defined in select_lang.inc.php3
 require("./select_lang.inc.php3");	// load language file
 
+// GZIP output buffering
+$cfgOBGzip = true;
+
 
 $cfgColumnTypes = array(
    "TINYINT",
    "SMALLINT",
    "MEDIUMINT",
    "INT",
Index: footer.inc.php3
===================================================================
RCS file: /cvsroot/phpmyadmin/phpMyAdmin/footer.inc.php3,v
retrieving revision 1.2
diff -u -w -U6 -r1.2 footer.inc.php3
--- footer.inc.php3	2001/07/20 16:27:14	1.2
+++ footer.inc.php3	2001/07/22 22:43:32
@@ -1,9 +1,9 @@
     </td>
   </tr>
 </table>
 </body>
 </html>
 <?php
-if ($ob_mode)
+if ($cfgOBGzip && $ob_mode)
   out_buffer_post($ob_mode);
 ?>
Index: header.inc.php3
===================================================================
RCS file: /cvsroot/phpmyadmin/phpMyAdmin/header.inc.php3,v
retrieving revision 1.9
diff -u -w -U6 -r1.9 header.inc.php3
--- header.inc.php3	2001/07/20 16:27:14	1.9
+++ header.inc.php3	2001/07/22 22:43:32
@@ -1,15 +1,18 @@
 <?php
 /* $Id: header.inc.php3,v 1.9 2001/07/20 16:27:14 lem9 Exp $ */
 
 require('./lib.inc.php3');
 require('./ob_lib.inc.php3');
 
+if ($cfgOBGzip)
+{
 $ob_mode = out_buffer_mode_get();
 if ($ob_mode)
   out_buffer_pre($ob_mode);
+}
 
 /**
  * Send http headers
  */
 // Don't use cache (required for Opera)
 $now = gmdate('D, d M Y H:i:s') . ' GMT';
Index: ob_lib.inc.php3
===================================================================
RCS file: /cvsroot/phpmyadmin/phpMyAdmin/ob_lib.inc.php3,v
retrieving revision 1.1
diff -u -w -U6 -r1.1 ob_lib.inc.php3
--- ob_lib.inc.php3	2001/07/20 16:27:14	1.1
+++ ob_lib.inc.php3	2001/07/22 22:43:33
@@ -13,13 +13,13 @@
 
   function out_buffer_mode_get()
   # This will be used eventually to support more modes.  It is
   # needed because both header and footer functions must know
   # what each other is doing.
   {
-    if (function_exists('ob_start'))
+    if (@function_exists('ob_start'))
       $mode = 1;
     else
       $mode = 0;
 
     # Zero (0) is no mode or in other words output buffering is OFF.
 


More information about the Developers mailing list