From: scarr at progbits dot com Operating system: Windows 2000 PHP version: 5.0.2 PHP Bug Type: *General Issues Bug description: tmp_name is not showing correct path
Description: ------------ 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. -- Edit bug report at http://bugs.php.net/?id=30306&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30306&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30306&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30306&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30306&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30306&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30306&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30306&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30306&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30306&r=support Expected behavior: http://bugs.php.net/fix.php?id=30306&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30306&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30306&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30306&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30306&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30306&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30306&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30306&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30306&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30306&r=mysqlcfg