From:             cyz at whiskey-soda dot de
Operating system: debian sarge 2.6.8-1-686 
PHP version:      4.3.10
PHP Bug Type:     Filesystem function related
Bug description:  move_uploaded_file - file gone after move

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 bug report at http://bugs.php.net/?id=32456&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32456&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32456&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32456&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32456&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32456&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32456&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32456&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32456&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32456&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32456&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32456&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32456&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32456&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32456&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32456&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32456&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32456&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32456&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32456&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32456&r=mysqlcfg

Reply via email to