Menu

Help Warning about ob_gzhandler

Help
Anonymous
2003-01-29
2012-10-11
  • Anonymous

    Anonymous - 2003-01-29

    I have just installed phpwiki and get the following warning on the homepage. How can I fix it?
    I have php4.3.0, mysql 3.23.52 and apache 1.3.26

    c:\phpwiki\lib\Request.php:143: Warning[2]: ob_gzhandler() [<a href='http://www.php.net/ref.outcontrol'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used twice

    Also like some others I initially got a blank page because I uncommented
    //define('USE_DB_SESSION',true);
    in index.php. Session data was written into the session table but nothing else happened. When I commented this define out again I got the main page with above warning.
    Alan

     
    • Anonymous

      Anonymous - 2003-02-16

      I have the exact same problem.
      Can anybody help?

       
      • Mike Hedman

        Mike Hedman - 2003-04-03

        Could you be more specific about where exactly to make this change?  When you say 'server', do you mean in the web server configuration, or do you mean in php.ini?

        Thanks

         
        • David Keltie

          David Keltie - 2003-09-11

          I've got the same problem and same question.

          Anybody help?

          Thanks, David

           
    • J. Rumpf

      J. Rumpf - 2003-02-20

      you have to disable the gz_handler flag in your server (htaccess flag). Because wiki is doing that on his own.
      So you'll get a double packing that will make this warning...

       
    • Sailesh Agrawal

      Sailesh Agrawal - 2003-09-30

      Here's something on one of the help pages:

      Problem with IE 6 when using PhpWiki 1.3.3

      This is using PhpWiki 1.3.3 on a hosted isp account (the machine where I installed phpwiki is running FreeBSD release 4.7 with the latest PHP on latest 1.3.x apache). Problem that I was seeing on IE 6:

      The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. Cannot have a DOCTYPE declaration outside of a prolog. Error processing resource 'http://lilly.csoft.net/~elev/elilev/phpwiki-1.3.3/'. Line 4, Position 11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

      ^

      So I took a look at index.php via Opera 7.  At the top of the page, I saw: lib/Request.php:116: Warning[2]: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' but Opera continued displaying the page.

      I went to Request.php code and commented out the code as follows:

          function compress_output() {

      //        if (function_exists('ob_gzhandler')) { //            ob_start('ob_gzhandler'); //            $this->_is_compressing_output = true; //        }

          }

      The problem is solved in terms of IE since its not seeing any bad html/xml. My question:  Am I causing any potential functionality problems with phpwiki by commenting the above? --EliLev

      answer from Jeff: Short answer: Leaving the compress_output() code commented out is fine.

      Details:

      The HTTP protocol allows for the transmission of web data in a compressed format (if both the web browser and web server support it.)  That code attempts to get PHP to compress it's output (if PHP thinks the browser can handle it.)

      If you comment the code out, the worst that happens is that the PHP output gets sent uncompressed.  (It may well be that apache is compressing the output for you --- that may actually be the reason for the trouble --- in which case you lose nothing other than the time you've had to spend to figure this all out.)

      Jeff

      PS:  The latest CVS code has a config define in index.php which controls when PhpWiki tries to compress it's own output.  (So you only have to adjust the configuration instead of commenting out code...)

      Commenting out that code solved another problem for me: Mozilla 1.3.1/Win, Mozilla Firebird/Win and IE5.5/Win produced a page full of rubbish (random characters etc.) when trying to open my Wiki. I guess those browsers couldn't handle the compression or so...

      -- OnnoBroekmans

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.