php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24618 Image does not display if include file has whitespace after last ?>
Submitted: 2003-07-12 07:20 UTC Modified: 2003-07-12 07:49 UTC
From: Ron at Termolog dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.2 OS: Windows XP and Linux
Private report: No CVE-ID: None
 [2003-07-12 07:20 UTC] Ron at Termolog dot com
Description:
------------
If an iclude file contains any form of whitespace after the closing ?> then an image (Png and Jpeg) displayed in the calling php file will not display. 

Reproduce code:
---------------
<? 
	header("Content-type: image/jpeg");
	include "anyfile.php3";

	$img = @ImageCreate (100, 100);
	$Blue  = ImageColorAllocate($img,0,0,255);
	imagefilledrectangle($img, 20, 20, 80, 80, $Blue);
	ImageJpeg ($img);
	imagedestroy($img);
?>	
-----------------------------------	
<?  //This is the include file (anyfile.php3)
	$dummy=1;
?> 

Expected result:
----------------
The image should be displayed

Actual result:
--------------
Image is not displayed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-12 07:49 UTC] elmicha@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See <http://www.php.net/function.include> and
<http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode>.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 10 12:01:30 2024 UTC