Bug #66742 [Opn->Fbk]: move_uploaded_file takes too long

From: Date: Sun, 13 Apr 2014 01:20:57 +0000
Subject: Bug #66742 [Opn->Fbk]: move_uploaded_file takes too long
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185197@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: Open +Status: Feedback Type: Bug Package: Performance problem Operating System: Centos 6 PHP Version: 5.6.0alpha2 Block user comment: N Private report: N New Comment: 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)? Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#185197) next »