From: michal dot aichinger at gmail dot com Operating system: Windows / Linux PHP version: 5.2.9 PHP Bug Type: *General Issues Bug description: Opera file upload - multiple files from one input cannot be handled
Description: ------------ Code below makes form with one file input. In Opera and Safari 4 it is possible select more than one file in this input. If you send this form in Safari it is in PHP normaly handled like multi file upload (multiple inputs). Upload from Opera caused empty $_FILES array. The diference between this browsers is that Opera use multipart/mixed for packing files from this input when posting data. Reproduce code: --------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Multiupload</title> </head> <body> <h1>Multiupload</h1> <form action="test.php" method="post" enctype="multipart/form-data"> <input type="file" name="files[]" multiple="multiple" min="0" max="5" /> <input type="submit" /> </form> <pre> <?php print_r($_FILES); ?> </pre> </body> </html> Expected result: ---------------- full $_FILES array after sending more files selected in files[] input from Opera Actual result: -------------- array is empty -- Edit bug report at http://bugs.php.net/?id=47789&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47789&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47789&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47789&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47789&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47789&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47789&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47789&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47789&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47789&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47789&r=support Expected behavior: http://bugs.php.net/fix.php?id=47789&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47789&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47789&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47789&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47789&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47789&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47789&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47789&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47789&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47789&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47789&r=mysqlcfg