|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30306 tmp_name is not showing correct path
Submitted: 2004-10-01 18:38 UTC Modified: 2005-01-25 01:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: scarr at progbits dot com Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.0.2 OS: Windows 2000
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: scarr at progbits dot com
New email:
PHP Version: OS:


 [2004-10-01 18:38 UTC] scarr at progbits dot com
I am uploading a file to a Win2000 system running Apache 2.0.47.  In PHP4, this code works fine.  I have not tried it with 5.0.1, but in 5.0.2, the file is saying everything worked.  

$_FILE['file']['tmp_name'] = 'C:DOCUME~1dialogicLOCALS~1Tempphp6F.tmp'
$_FILE['file']['error'] = 0

There is no directory seperators in the field.  If I set 
upload_tmp_dir = c:\\winnt\\temp\\

Then I get c:\winnt\temp\php6b.tmp, but is_uploaded_file still fails.

I am not receiving any permission errors, and Apache is running as a user that has access to the temp folder, and the folder I am trying to move the file to as well.

Reproduce code:
if (move_uploaded_file($values['uploadfile']['tmp_name'], "{$GLOBALS['strCODir']}temp\\{$values['uploadfile']['name']}")) {
   trigger_error("Worked", E_USER_NOTICE);
} else {
  trigger_error("Failed", E_USER_NOTICE);

Expected result:
File should be uploaded, and tmp_name points to the path on the local system where PHP put the file.

Actual result:
tmp_name does not appear to be pointing to the file properly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-01 20:16 UTC] scarr at progbits dot com
I don't know how the system got into this mode.  But it seems, to be working now.  

I installed php versions all the way back to 4.3.2. Then all of a sudden it worked.  I then installed version 4.3.9 and it worked, and then 5.0.2 and it worked.

This is strange, but it is working now.
 [2004-10-01 20:35 UTC] scarr at progbits dot com
As suddenly as it started working, now it back to not working again.  I restarted apache, and that didn't help. So I stopped apache, renamed the folder to php.502, and renamed php.432 back to php.

Restarted apache, and everything started working again.

This is getting frustrating.
 [2005-01-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Feb 29 13:01:28 2020 UTC