|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #20851 windows and upload_tmp_dir
Submitted: 2002-12-05 21:34 UTC Modified: 2003-02-07 23:44 UTC
Avg. Score:3.8 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: fernando dot conceicao at terra dot com dot br Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: 4.2.3 OS: Windows Millenium
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: fernando dot conceicao at terra dot com dot br
New email:
PHP Version: OS:


 [2002-12-05 21:34 UTC] fernando dot conceicao at terra dot com dot br
In a mailing list the people tell they can?t make the example of file upload work, only who uses windows. So a begin work on this and discover why.
If you don?t define upload_tmp_dir in php.ini, appears that php don?t know where to put, or it puts the file but don?t know where so $_FILES['userfile']['name'] return the correct value, but $_FILES['userfile']['tmp_name'] comes empty and you can?t move the file.
Note that I don?t have anything in TMPDIR too.
The people on windows "must" set the upload_tmp_dir in php.ini, without this can?t upload a file.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-21 12:17 UTC]
According to the source there are defaults.  Here are some  comments found within hp_open_temporary_file.c:

/* We can't count on the environment variables TEMP or TMP,
 * and so must make the Win32 API call to get the default
 * directory for temporary files.  Note this call checks
 * the environment values TMP and TEMP (in order) first.

That call is made to GetTempPath.

Run msconfig.exe and tell us what the above environment variables are set to on your system.
 [2003-01-26 11:06 UTC] fernando dot conceicao at terra dot com dot br
I read the changelog and for me appear that this is something like the bug 20725, that was fixed in PHP 4.3.0, since I try do it again in 4.3.0 and the PHP put the files on C:/windows/temp, but this don?t work on 4.2.3.
 [2003-01-26 11:21 UTC]
So your default tmp directory couldn't be written to or it didn't exist at all?
 [2003-02-07 23:44 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jun 13 21:01:24 2021 UTC