Bug #13103: Image output functions doesn't work properly with output buffering.

From: Date: Mon, 03 Sep 2001 08:38:49 +0000
Subject: Bug #13103: Image output functions doesn't work properly with output buffering.
Groups: php.dev 
Request: Send a blank email to php-dev+get-64941@lists.php.net to get a copy of this message
From: tais.hansen@osd.dk Operating system: FreeBSD 4.2 PHP version: 4.0.4pl1 PHP Bug Type: Output Control Bug description: Image output functions doesn't work properly with output buffering. Example: $im = imageCreateFromPNG( "test-ob.png" ); ob_start(); imagePNG( $im ); $outbuffer = ob_get_contents(); ob_end_clean(); header( "Content-Type: image/gif" ); print $outbuffer; (test url: "http://www.osd.dk/test/test-ob.php") The script above will fail on the "header( ..." line stating that output has already been sent and thus no more headers can be added. For some reason the imagePNG() function (and other image output functions) seems to end the header section of the output even though output buffering is active. I'm currently unable to test this on a newer version of php. Regards, Tais M. Hansen -- Edit bug report at: http://bugs.php.net/?id=13103&edit=1

« previous php.dev (#64941) next »