From: kevin_winahradsky at hotmail dot com Operating system: Linux 2.4.18 PHP version: 5.0.0RC1 PHP Bug Type: HTTP related Bug description: HTTP POST file uploads do not give error when canceled
Description: ------------ When doing an HTTP POST upload of a file, if the upload is canceled by closing the browser, $_FILES['userfile']['error'] will be equal to UPLOAD_ERR_OK. Reproduce code: --------------- <html> <head> </head> <body> <p> <?php if (isset($_FILES['userfile'])) { error_log("error = " . $_FILES['userfile']['error']); error_log("size = " . $_FILES['userfile']['size']); print("<br>" . $_FILES['userfile']['error']); error_log("completed!"); } ?> </p> <p><form enctype="multipart/form-data" action="fileuploadtest.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="50000000"> <input name='userfile' type="file" size="30"> <br> <input type="submit"> </form></p> </body></html> Expected result: ---------------- I would expect $_FILES['userfile']['error'] to be set to UPLOAD_ERR_PARTIAL. Actual result: -------------- $_FILES['userfile']['error'] is set to UPLOAD_ERR_OK. -- Edit bug report at http://bugs.php.net/?id=28015&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28015&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28015&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28015&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28015&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28015&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28015&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28015&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28015&r=support Expected behavior: http://bugs.php.net/fix.php?id=28015&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28015&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28015&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28015&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28015&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28015&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28015&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28015&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28015&r=float