php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32456 move_uploaded_file - file gone after move
Submitted: 2005-03-25 18:35 UTC Modified: 2005-04-02 01:00 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: cyz at whiskey-soda dot de Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 4.3.10 OS: debian sarge 2.6.8-1-686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 - 27 = ?
Subscribe to this entry?

 
 [2005-03-25 18:35 UTC] 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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC