php forum
php mysql forum
php mysql smarty
 
Topic Options
#286351 - 09/05/01 06:06 PM Featured 6.1.0 Modification : File Compression with cgi_buffer.pm
The Team Offline
Moderator

Registered: 08/11/00
Posts: 182
Loc: yes

   Featured 6.1.0 Modification : File Compression with cgi_buffer.pm to Del.icio.us Add to del.icio.us
  Digg Featured 6.1.0 Modification : File Compression with cgi_buffer.pm Digg it
Featured 6.1.0 Modification : File Compression

Discussion: http://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=30&t=000049

If you run on a dedicated server and have had your head stuck in the sand for the last, oh, 4 hours, you've missed one of the more useful modifications to come out in a long while for UBB™ forums and forums in general. No more enduring sneering chants of "We've got compression, yes we do! We've got compression, how about you?" You too can have file compression for your forum and watch as the bandwidth and download time plummets!

First, a thank you to <a href="http://ubbforums.infopop.com/cgi-bin/ultimatebb.cgi?ubb=get_profile&u=00025023">Wild</a> for pointing out this module to the rest of us slow people, too bad we didn't know about it a year ago when it came out. <IMG SRC="smilies/smile.gif" border="0">

What :: This is a perl module you can install on your server to provide up to 70% bandwidth savings in a matter of minutes. Developed by Mark Nottingham <mnot@pobox.com>, it is simple to install and is very recommended once you weigh the caveats. The compression => bandwidth savings + increase in download speed is great, but with it comes a increase in CPU usage as the server has to work to compress the files. Weigh this con against the pro and give it a shot on your server, you may be pleasantly surprised at the increase in speed.


How :: Obtain the files and instructions for installing it on Unix servers from here: http://www.mnot.net/cgi_buffer/

Requirements:

cgi_buffer.pm is a Perl ( http://www.perl.com/ ) library, and has been tested with Perl 5.004, on Linux. There should be no great issues using it with Windows platforms, but the author has little experience using CGI on them, and CANNOT SUPPORT WINDOWS INSTALLATIONS.

The following libraries need to be installed; see CPAN ( http://www.cpan.org/ ) for more information:

* MD5
* IO::String
* Compress::Zlib

Servers with recent installations of ActiveState perl (5.6.1 preferred - http://www.activestate.com - including Windows servers) already have these modules installed. Obtain the cgi_buffer files from the above address and install.

If you have a windows server (Win2K/IIS5 has been tested), just copy the cgi_buffer.pm file to your C:perllib directory and you're set as far as installation.

Open ultimatebb.cgi, uncomment use strict; and use vars etc etc (lines #30 and #35) and add this:
require cgi_buffer;
immediately after your use strict; so that it looks like this:

use strict;
require cgi_buffer;
use Fcntl ':flock';
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

use vars qw(%etc etc

If you are getting errors that include "Status: 304 Not Modified " add :
$cgi_buffer::generate_etag = 0;
immediately after require cgi_buffer; so that it looks like this:

use strict;
require cgi_buffer;
$cgi_buffer::generate_etag = 0;
use Fcntl ':flock';
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

use vars qw(%etc etc

That should be all you need to do, tho you may want to clear cache... <IMG SRC="smilies/smile.gif" border="0">

You may also use the Apache Module mod_gzip if you are running an Apache server. If you are on a Windows server the native ISAPI compression module is already installed and performs better than either method, you will need to set it to compress cgi/pl tho.

Resources:

Win2K: http://www.microsoft.com/technet/treevie...ze/perflink.asp
http://support.microsoft.com/support/kb/articles/Q255/9/51.ASP

Apache: http://www.remotecommunications.com/apache/mod_gzip/ http://www.extremeoverclocking.com/articles/howto/mod_gzip_1.html

UBBDev: http://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=10&t=000990

Top


Who's Online
0 Registered (), 22 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 01:36 PM
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Newest Members
Kevs, pisa666, ghengis317, NitroX, Dogan
13346 Registered Users
Top Posters Last 30 Days
AllenAyres 11
blaaskaak 6
Chris Bale 4
Gizmo 4
FREAK1 4
Ian_W 4
tackaberry 4

 

 

 
fusionbb message board php hacks