ID:               23023
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mak77 at anvi dot it
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: Windows XP
 PHP Version:      4.3.2RC1
 New Comment:

Please tell us what headers are output when you run your script? (And
I'm pretty sure this is IE6 bug and not PHP bug)



Previous Comments:
------------------------------------------------------------------------

[2003-04-02 11:18:43] mak77 at anvi dot it

ok so here is my problem

my php.ini is set to

output_buffering = On
output_handler = ob_gzhandler
zlib.output_compression = Off
;zlib.output_handler =

and i have a script (content management system similar to php-nuke),
it's a very big pile of code so i cannot put here it all.

hwv... the script has mainly an API that is a class..
the part of interest is

class API
{
      var $_OB=true;
      var $_OB_HANDLER='ob_gzhandler';
      function API()
      {
        if(ini_get('zlib.output_compression')) $this->_OB_HANDLER='';
        if(!ini_get('output_buffering') && $this->_OB)
{ob_start($this->_OB_HANDLER);}
        if(!$this->_OB && ini_get('output_buffering'))
{$this->_OB=true;}
      }

      ... other code
}

a page is build as 
   $API->page_start(); //html headers and module initialize
   //contents here
   $API->page_end();

the problem is that having output_buffering=on often the browser stay
"stuck" waiting for the page (and i have to refresh to get the page),
while other times it renders the page immediately.

the problem totally disappear if i set output_buffering=off in the
php.ini file (i can do this on my pc but not on provider's server!)

so i've tried to put this code in $API->page_end (the last function
called)

          if($this->_OB) {
                                //$page=ob_get_contents();
                                $page=ob_get_contents();
                                $fp=fopen("debug.txt","w");
                               
fwrite($fp,var_export(ob_get_status(true),true)."\n\n".$page);
                                fclose($fp);
                                ob_end_flush();
                         }

the scripts reach the end (a debug.txt file is created correctly) but
the page is not always displayed (1 time works correctly, 1 time the
browser wait for something and do nothing)

the debug.txt file contains:

array (
  0 => 
  array (
    'chunk_size' => 0,
    'size' => 61440,
    'block_size' => 10240,
    'type' => 1,
    'status' => 0,
    'name' => 'ob_gzhandler',
    'del' => true,
  ),
)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; />

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="IT" lang="IT"
dir="ltr">

 <head>
 
... and so on

Browser is IE 6.0 sp1, works correctly with mozilla 1.2, so is probably
some header's problem.
Same problem with phpMyAdmin 2.4.0
server is IIS 5.1, php installed as an isapi filter
waiting for some help if possible, i'll try to create a little script
to reproduce the problem...

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23023&edit=1

Reply via email to