#32456 [Opn->Fbk]: move_uploaded_file - file gone after move
| From: | sniper@php.net | Date: | Fri, 25 Mar 2005 22:32:43 +0000 |
| Subject: | #32456 [Opn->Fbk]: move_uploaded_file - file gone after move | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75871@lists.php.net to get a copy of this message | ||
ID: 32456
Updated by: sniper@php.net
Reported By: cyz at whiskey-soda dot de
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: debian sarge 2.6.8-1-686
PHP Version: 4.3.10
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-03-25 18:35:59] cyz at whiskey-soda dot de
Description:
------------
i moved from my old server to a new faster one ...
everything works fine except uploading files
move_uploaded_file produces NO errors or NO warnings ... but the file
does not reach its destination
i can read /fpassthru it from the $_FILES['tmp_name'] and i can copy it
... just move_uploaded_file does not work
safe mode is on on the old server - off on the new server
Reproduce code:
---------------
$upload_dir = "tmp/";
$filename = $_FILES['filetoupload']['name'];
/*
if (copy($_FILES['filetoupload']['tmp_name'],$upload_dir.$filename)) {
// this works
}
*/
if
(move_uploaded_file($_FILES['filetoupload']['tmp_name'],$upload_dir.$filename))
{
// this does not works but shows no errors
echo "done"; # this is shown
}
Expected result:
----------------
a file in my tmp/ directory ... but it doesnt reach it
Actual result:
--------------
the tmp/ directory stays empty when i use move_uploaded_file (copy
works though)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32456&edit=1