Bug #66742 [Fbk->NoF]: move_uploaded_file takes too long
| From: | tyrael@php.net | Date: | Wed, 02 Jul 2014 19:46:40 +0000 |
| Subject: | Bug #66742 [Fbk->NoF]: move_uploaded_file takes too long | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186430@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66742&edit=1
ID: 66742
Updated by: tyrael@php.net
Reported by: rsaurinI at discoverydn dot com
Summary: move_uploaded_file takes too long
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Performance problem
Operating System: Centos 6
PHP Version: 5.6.0alpha2
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2014-04-13 01:20:56] tyrael@php.net
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-02-19 21:18:54] rsaurinI at discoverydn dot com
Description:
------------
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!';
else
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66742&edit=1