|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5023 tmpfile() function broken on Win32
Submitted: 2000-06-14 07:56 UTC Modified: 2005-03-31 16:13 UTC
From: doug_Bridges at hotmail dot com Assigned:
Status: Wont fix Package: Other
PHP Version: 3.0.16 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: doug_Bridges at hotmail dot com
New email:
PHP Version: OS:


 [2000-06-14 07:56 UTC] doug_Bridges at hotmail dot com
I am having a problem with the GD library on windows. When a php script tries to call ImageGIF, I get the error that PHP is unable to create a temporary file. PHP is using the tmpfile() command to create a temporary file. Unfortunately, tmpfile() has a bug when compiled using Microsoft Visual C++. The function tmpfile() will always create the temporary file in the root directory of the webserver. I obviously cannot have php creating a file in the root directory of my webserver. This function call is used several other times in the ftp and file functions.

Microsoft suggests correcting the problem by using tmpnam() and fopen(). The Microsoft bug report can be found at:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 05:05:53 2022 UTC