|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66742 move_uploaded_file takes too long
Submitted: 2014-02-19 21:18 UTC Modified: 2014-07-02 19:46 UTC
Avg. Score:3.7 ± 1.9
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rsaurinI at discoverydn dot com Assigned:
Status: No Feedback Package: Performance problem
PHP Version: 5.6.0alpha2 OS: Centos 6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-02-19 21:18 UTC] rsaurinI at discoverydn dot com
Calling move uploaded file on a file uploaded to the standard /tmp folder. Uploaded file size was 2.8m, but that function took about 5-6 seconds to complete. The copy function is a good workaround for now and is fast as expected.

Test script:
$file = $_FILES['file_name'];
$fullPathToFile = '/home/dir/destination';

if(! move_uploaded_file($file[ 'tmp_name' ], $fullPathToFile))
  echo 'Error!';
  echo 'Success!';

Expected result:
The file should be moved relatively quickly. Larger files may take longer.

Actual result:
Small files take a long time to move.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-13 01:20 UTC]
-Status: Open +Status: Feedback
 [2014-04-13 01:20 UTC]
copy is not a safe alternative for move_uploaded_file(),
could you verify that you can still reproduce this issue with the latest 5.6.0 release(beta1)?
 [2014-07-02 19:46 UTC]
-Status: Feedback +Status: No Feedback
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 02:01:30 2024 UTC