Bug #66742 [NEW]: move_uploaded_file takes too long

From: Date: Wed, 19 Feb 2014 21:18:54 +0000
Subject: Bug #66742 [NEW]: move_uploaded_file takes too long
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184366@lists.php.net to get a copy of this message
From: rsaurinI at discoverydn dot com Operating system: Centos 6 PHP version: 5.6.0alpha2 Package: Performance problem Bug Type: Bug Bug description:move_uploaded_file takes too long 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 bug report at https://bugs.php.net/bug.php?id=66742&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66742&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66742&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66742&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66742&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66742&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66742&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66742&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66742&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66742&r=support Expected behavior: https://bugs.php.net/fix.php?id=66742&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66742&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66742&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66742&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66742&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66742&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66742&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66742&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66742&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66742&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66742&r=mysqlcfg

« previous php.bugs (#184366) next »