From:             larryf at gmail dot com
Operating system: Windows 2003
PHP version:      5.1.4
PHP Bug Type:     Filesystem function related
Bug description:  move_uploaded_file removes file

Description:
------------
Hi.  I am using a simple upload script to upload files.  It works on many
file sizes, but on file sizes > 500 megs i can see the file in the tmp
directory reach 400something megs and then it dissappears. 

Reproduce code:
---------------
                if (!is_dir("files/$id"))
                {
                        mkdir("files/$id", 0777);
                        chmod("files/$id", 0777);
                }
                $uploadfile =  "files/$id/" . $id . "." . $file[count($file) - 
1];
                move_uploaded_file($_FILES["thefile"]["tmp_name"], $uploadfile);
                chmod($uploadfile, 0777);

for the php.ini config i have
memory_limit = 20M      
post_max_size = 5124M
upload_max_filesize = 4500M
apache 2.0

Expected result:
----------------
move file to files/id/id

Actual result:
--------------
it makes the directory, but the file is not moved there.  This works for
files < 500 megs, why not more?  The only error reported in apache logs
are for chmod at the end

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

Reply via email to