Bug #54951 [Opn->Nab]: Temporary Files Are NOT Deleted

From: Date: Mon, 30 Mar 2015 21:26:59 +0000
Subject: Bug #54951 [Opn->Nab]: Temporary Files Are NOT Deleted
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12066@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54951&edit=1 ID: 54951 Updated by: cmb@php.net Reported by: miqrogroove at gmail dot com Summary: Temporary Files Are NOT Deleted -Status: Open +Status: Not a bug Type: Bug Package: Documentation problem Operating System: Windows 2003 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Even on Windows uploaded files are supposed to be removed at the of the request. I just verified with PHP 5.4.19 on Windows 7. Previous Comments: ------------------------------------------------------------------------ [2011-05-30 05:18:20] rasmus@php.net Then that is a Windows-specific issue. They are removed everywhere else. ------------------------------------------------------------------------ [2011-05-29 18:08:48] miqrogroove at gmail dot com Description: ------------ In http://www.php.net/manual/en/features.file-upload.post-method.php "The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed." This is blatantly wrong. PHP does not automatically remove any uploaded .tmp file from the temporary directory. PHP 5.3.1 and 5.3.6 were tested specifically to confirm this behavior is not as documented. Test script: --------------- test.php, placed on website: <form method="post" enctype="multipart/form-data"> <input name="myfile" type="file" /> <input type="submit" /> </form> Expected result: ---------------- While monitoring the temporary directory, essentially nothing should happen. Actual result: -------------- Each click of the Submit button causes an additional file to be added to the temporary directory. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54951&edit=1

« previous php.doc.bugs (#12066) next »