From: Operating system: Windows Server 2008 R2 PHP version: 5.3.8 Package: Filesystem function related Bug Type: Bug Bug description:$_FILES 'name' missing first character after upload.
Description: ------------ After uploading a file using a multipart/form-data HTML form, the resulting file name is missing the initial character (i.e. readme.txt becomes eadme.txt). Server: Apache/2.2.19 (Win32) mod_ssl/2.2.19 OpenSSL/1.0.0d PHP/5.3.8 Test script: --------------- <FORM ACTION="<? echo $_SERVER['PHP_SELF']; ?>" METHOD="POST" ENCTYPE="multipart/form-data"> File: <INPUT TYPE="file" NAME="filename"> <INPUT TYPE="submit" VALUE="go"> </FORM> <? if (isset($_FILES)) { var_dump($_FILES); } ?> array(1) { ["filename"]=> array(5) { ["name"]=> string(10) "eadme.txt" ["type"]=> string(10) "text/plain" ["tmp_name"]=> string(31) "C:\temp\file_upload\php7D44.tmp" ["error"]=> int(0) ["size"]=> int(3420) } } Expected result: ---------------- $_FILES['filename']['name'] should be intact rather than missing the first character. ["name"]=> string(10) "readme.txt" Actual result: -------------- $_FILES['filename']['name'] is missing the first character: ["name"]=> string(10) "eadme.txt" -- Edit bug report at https://bugs.php.net/bug.php?id=55510&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55510&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55510&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55510&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55510&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55510&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55510&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55510&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55510&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55510&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55510&r=support Expected behavior: https://bugs.php.net/fix.php?id=55510&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55510&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55510&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55510&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55510&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55510&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55510&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55510&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55510&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55510&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55510&r=mysqlcfg