FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

problem when using ob_start("ob_gzhandler") on php

 


Philip
i created a portal that using phpbb, and i readed a post on www.frihost.com that ob_start("ob_gzhandler") can improve speed for browsing. indeed it increasing but it seem

after a second and open other pages, i logouted from phpbb system, i dont know why, can someone suggest me what wrong ?

my code is like this..
index.php
Code:
<?
   header('Cache-Control: no-cache');
   error_reporting(0);
   clearstatcache();
   include('password.php');
   define('IN_PHPBB', true);       
   $phpbb_root_path = './phpBB2/';
   include($phpbb_root_path . 'extension.inc');
   include($phpbb_root_path . 'common.'.$phpEx);
   include($phpbb_root_path . 'includes/functions_mod_user.'.$phpEx);
   //
   // Start session management
   //
   $userdata = session_pagestart($user_ip, PAGE_INDEX);
   init_userprefs($userdata);
   //
   // End session management
   //

   ob_start("ob_gzhandler");

?>
contain
<?
ob_flush();   
?>


thanks,


Last edited by Philip on Wed Sep 20, 2006 1:33 pm; edited 1 time in total
shamil
Try this:
Code:
<?
   ob_start("ob_gzhandler");
   header('Cache-Control: no-cache');
   error_reporting(0);
   clearstatcache();
   include('password.php');
   define('IN_PHPBB', true);       
   $phpbb_root_path = './phpBB2/';
   include($phpbb_root_path . 'extension.inc');
   include($phpbb_root_path . 'common.'.$phpEx);
   include($phpbb_root_path . 'includes/functions_mod_user.'.$phpEx);
   //
   // Start session management
   //
   $userdata = session_pagestart($user_ip, PAGE_INDEX);
   init_userprefs($userdata);
   session_write_close();
   //
   // End session management
   //


?>
contain
<?
ob_flush();   
?>

You should take a look at readers' comments http://www.zend.com/zend/art/buffering.php?article=buffering&kind=a&id=2636&open=1&anc=0&view=1
Philip
wew, i tested it and worked Smile

thanks.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.