From: lobo235 at gmail dot com Operating system: Windows and Linux PHP version: 4CVS-2005-01-04 (stable) PHP Bug Type: Unknown/Other Function Bug description: File Upload Original name problem
Description: ------------ The full name of the file is not put into the $_FILES[] array when a file is uploaded that has an apostrophe in the name. For example: lobo235's fam.jpg The first part of the filename including the apostrophe is cut off so it shows as: s fam.jpg I am using $_FILES['userfile']['name'] to try and get the original file name when I see this. Reproduce code: --------------- <?php echo "<h2>".$_FILES['userfile']['name']."</h2>"; ?> <form method="post" action="p.php" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="7000000" /> Attach this file: <input name="userfile" type="file" size="32" /><br />(<i>Max Size: 7 Megabytes</i>)<br /> <input type="submit" name="attach" value="Attach" /> </form> Expected result: ---------------- The full name of the file uploaded including the apostrophe. Actual result: -------------- The first part of the filename is cut off including the apostrophe. -- Edit bug report at http://bugs.php.net/?id=31398&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31398&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31398&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31398&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31398&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31398&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31398&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31398&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31398&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31398&r=support Expected behavior: http://bugs.php.net/fix.php?id=31398&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31398&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31398&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31398&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31398&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31398&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31398&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31398&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31398&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31398&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31398&r=mysqlcfg