|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-30 02:46 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 00:00:02 2025 UTC |
Description: ------------ I have the script hosted at www.rackspace.com on their cloud sites service which has this library installed. I have noticed that the order of the hidden variables in relation to the file field determines if the upload is successful or not. If the "UPLOAD_IDENTIFIER" and "MAX_FILE_SIZE" is before the file info, the progress bar works fine, but the upload does not work (TMP directory never gets the file). However, if I put the hidden vars after the file field, the upload works perfectly, but the progress bar does not work. Reproduce code: --------------- <?php if ($_POST['submitted'] == '1') { echo "<pre>"; var_dump($_FILES); echo "</pre>"; } ?> <form action="delme.php" method="post" enctype="multipart/form-data" > <input type="file" name="upload_file" id="upload_file" size="55" /> <input type="hidden" name="submitted" id="submitted" value="1" /><br /> <input type="submit" name="continue" id="continue" value="Upload" /> <!-- if the following lines are at the top of the form, the upload does not work --> <input type="hidden" name="MAX_FILE_SIZE" value="4096000000" /> <input type="hidden" name="UPLOAD_IDENTIFIER" value="<?php echo md5(time());?>" /> </form> Expected result: ---------------- I would expect the upload to work and the progress be reported back. Actual result: -------------- The above code will upload the file, but the progress is not reported back. If the hidden vars are moved to the top of the form, the progress works, but the uploaded file is nowhere to be found. Review of the $_FILES shows that there was no temp file created.