phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Able2know mod rewrite and Gun-Zip problem

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: 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 Sad



I'm using able2know mod_rewrite and seo,
enabled gzip forum admin,
and my php info : lavinya.net /phpinfo.php


please help me.. Rolling Eyes


--
EDİT:
Only mozilla and firefox I See error.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: 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 Wink

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 Wink


++

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 9:12 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

hımm Confused

big thanks dcz.

I'm using phpBB 2.0.21 .

Code:
if ( $do_gzip_compress )
already added. BUT mixed AND arduous Sad

dcz please see my files check please Embarassed
www.lavinya.net/2.zip (page_header and page_tail)
Back to top
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 9:19 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

sorry dcz. small english Sad

using seslisozluk.com
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: 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 Wink

++

_________________
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
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 9:25 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

lavinya wrote:
sorry dcz. small english Sad

using seslisozluk.com


Lol, don't worry, you'll imporve Very Happy Something like an SEO side effect Laughing

++

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 10:00 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

Laughing vavv

thanks dcz. you excellent.

now trying below code Smile
Back to top
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 10:08 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

dcz error direct page Sad(

click to www.lavinya.net/phpBB2/



now delete below code I back to old code Sad
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: 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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 11:23 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

thanks for reply Smile

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
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 11:27 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

Must be your server having trouble with gun-zip and ob_start then. It's very common.

I think you have no choice but to turn it off and go back to original code then, or give a try to the phpBB SEO method, since you can migrate with no trouble if we setup the correct redirections.

++

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 12:34 pm    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

OK. thanks dcz for quickly your reply messages Smile


can you look at this http://www.phpbb.com/phpBB/viewtopic.php?p=257466#257466

he solved that problem at this link.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Able2know mod rewrite and Gun-Zip problemPosted: Fri Sep 08, 2006 12:46 pm    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

That's the problem with ob_start(), if a mod adds other things in the buffer and such. With what I suggested there should not be any more issues, but who knows.

Anyway, the regular phpbb ob_implicit_flush was already taken out in the code changes I sent, so beside migrating ...

++

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Able2know mod rewrite and Gun-Zip problemPosted: Sat Sep 09, 2006 8:19 am    Post subject: Re: Able2know mod rewrite and Gun-Zip problem

thanks dcz .
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 1

Navigation Similar Topics

Jump to: