|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30696 using gd to create gif leaves tmp files in root directory
Submitted: 2004-11-05 20:31 UTC Modified: 2004-11-06 01:56 UTC
From: kmacrae at yahoo dot com Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.9 OS: win XP sp2
Private report: No CVE-ID: None
 [2004-11-05 20:31 UTC] kmacrae at yahoo dot com
Using bundled gd2 to create gif leaves tmp files in root directory.
The tmp files are the gif images being generated by the scripts with a .tmp extension instead of a .gif extension.
No issues with jpeg or png!
Problem also exists in 5.02 release (same gd 2.0.28).
Writing and leaving is slow and messy... if not cleaned will crash server.

Reproduce code:
//Create a blank image canvas
$image = ImageCreate($width, $height);
// allocate color
$black    = imagecolorallocate($image, 0x00, 0x00, 0x00);
//Draw it
ImageRectangle($image, 0, 0, $width-1, $height-1, $black);
// Flush Image 
//header("Content-type: image/jpeg");//OK
//ImageJPEG($image, '', 100);
//header("Content-type: image/png");//OK
header("Content-type: image/gif");//leaves  ??.tmp in C:\

Expected result:
just the image no .tmp files

Actual result:
got .tmp file and image


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-06 01:56 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 10:01:29 2024 UTC