Bug #13103 Updated: Image output functions doesn't work properly with output buffering.
| From: | sniper@php.net | Date: | Fri, 16 Nov 2001 00:23:48 +0000 |
| Subject: | Bug #13103 Updated: Image output functions doesn't work properly with output buffering. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70611@lists.php.net to get a copy of this message | ||
ID: 13103
Updated by: sniper
Reported By: tais.hansen@osd.dk
Old Status: Feedback
Status: Closed
Bug Type: Output Control
Operating System: FreeBSD 4.2
PHP Version: 4.0.4pl1
New Comment:
User feedback:
---------------
I haven't been able to check it in version 4.0.6 until last week. But it
seems like it works in 4.0.6. So I guess case is closed then. Great.
--------
Closed.
Previous Comments:
------------------------------------------------------------------------
[2001-11-15 06:49:58] sander@php.net
Are you sure there is no whitespace before the <?php-tag???
And if that's not the case, can you try the latest snapshot or at least 4.0.6?
------------------------------------------------------------------------
[2001-09-03 04:38:49] tais.hansen@osd.dk
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 this bug report at http://bugs.php.net/?id=13103&edit=1