| :: |
| Author |
Message |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 8:32 am Post subject: Able2know mod rewrite and Gun-Zip problem |
|
|
hello all.
I can see certain dates above error
I'm using able2know mod_rewrite and seo,
enabled gzip forum admin,
and my php info : lavinya.net /phpinfo.php
please help me..
--
EDİT:
Only mozilla and firefox I See error. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Fri Sep 08, 2006 8:55 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
Well it seems it's only the Gziped buffer to be sent without the Content-Encoding header.
These are the kind of things happening when using ob_start
I suggest you check you includes/page_header.php and page_tail.php, around :
| Code: | | if ( $board_config['gzip_compress'] ) |
for header and
| Code: | | if ( $do_gzip_compress ) |
for tail, and check if you have the correct 2.0.21 code here.
But I am pretty sure the Gzip handling was modified by the able2know mod rewrite, so it's not necessarily going to be easy to fix that.
Anyway, with Gun-zip, it's only a matter of resources (will take more) vs bandwidth (will need less), meaning you can leav without.
Maybe the simplest method to fix this will be to migrate to one of the phpBB SEO mod rewrites
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 9:12 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
hımm
big thanks dcz.
I'm using phpBB 2.0.21 .
| Code: | | if ( $do_gzip_compress ) | already added. BUT mixed AND arduous
dcz please see my files check please
www.lavinya.net/2.zip (page_header and page_tail) |
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 9:19 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
sorry dcz. small english
using seslisozluk.com |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Fri Sep 08, 2006 9:24 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
So it seems Gun-zip never was available with the abl2know mod rewrite as it's code :
| Code: | if ( !$userdata['session_logged_in'] )
{
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;
} |
is destroying the buffer (ob_end_clean(); ) before it is eventually sent Gunzipped.
You can try :
Open :
| Code: | | includes/page_tail.php |
Find :
| Code: | if ( !$userdata['session_logged_in'] )
{
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;
}
//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
} |
Replace with :
| Code: |
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if( function_exists(ob_gzhandler) && $board_config['gzip_compress'] == 1)
{
if ( !$userdata['session_logged_in'] )
{
$gzip_contents = replace_for_mod_rewrite(ob_get_contents());
}
else
{
$gzip_contents = ob_get_contents();
}
ob_end_clean();
ob_start('ob_gzhandler');
echo $gzip_contents;
ob_end_flush();
}
else
{
$contents = ob_get_contents();
ob_end_clean();
echo $contents;
global $dbg_starttime;
}
// www.phpBB-SEO.com SEO TOOLKIT END
|
I cannot test, as I do not run the able2know mod rewrite, but it should solve your issue
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 10:00 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
vavv
thanks dcz. you excellent.
now trying below code  |
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 10:08 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
dcz error direct page (
click to www.lavinya.net/phpBB2/
now delete below code I back to old code  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Fri Sep 08, 2006 10:15 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
Sorry I forgot to mention you should as well delete this from page_header.php :
| Code: | //
// gzip_compression
//
$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
$useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
} |
And find :
| Code: | if ( !$userdata['session_logged_in'] )
{
ob_start(); |
and replace with :
| Code: | ob_start();
if ( !$userdata['session_logged_in'] )
{ |
as we are now handling Gun-zip through ob_gzhandler which does all the header sending and such.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Fri Sep 08, 2006 11:23 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
thanks for reply
dcz I added below all code
forum is working.
but I surfing my forum
certain times topic or post click this error:
 |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 161 Location: Turkey
|
Posted: Sat Sep 09, 2006 8:19 am Post subject: Re: Able2know mod rewrite and Gun-Zip problem |
|
|
| thanks dcz . |
|
|
| Back to top |
|
 |
|
|