|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-31 11:01 UTC] xeon dot g8 at gmail dot com
[2013-08-21 21:01 UTC] r dot pestel at googlemail dot com
[2013-09-05 19:46 UTC] dmulder at qnx dot com
[2017-09-10 10:39 UTC] awlurker at yandex dot ru
[2017-12-04 14:34 UTC] luk dot krchnak at gmail dot com
[2018-03-20 01:20 UTC] tung12a1 at yahoo dot com
[2021-02-17 22:57 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2021-02-17 22:57 UTC] cmb@php.net
[2021-05-17 17:27 UTC] sudoma at seznam dot cz
[2021-05-20 10:48 UTC] sudoma at seznam dot cz
[2024-04-12 23:39 UTC] git@php.net
[2024-04-12 23:39 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ If using ftp_put() the upload speed is 10-20 times slower that when using a "regular" FTP client like Filezilla. Uploading with cUrl is equally slow. Tested on multiple PHP versions on several Windows operating systems and on two different networks, all same. Note that downloading (ftp_get()) is equally fast as using Filezilla. Test script: --------------- <?php $conn_id = ftp_connect ( "ftpserver" ); $login_result = ftp_login ( $conn_id, "username", "password" ); if ((! $conn_id) || (! $login_result)) { exit ( "No FTP connection" ); } else { ftp_pasv ( $conn_id, true ); $size = filesize ( $localfile ); $start_timer = time (); if (ftp_put ( $conn_id, "remote file", "local file", FTP_BINARY )) { $end_timer = time (); $time_spent = $end_timer - $start_timer; echo "Transferred $size bytes in $time_spent seconds"; } else { exit ( "FTP upload error" ); } ftp_close ( $conn_id ); } ?> Expected result: ---------------- The file should be transferred at the same speed as when using a "regular" FTP client like Filezilla. Actual result: -------------- Filezilla File transfer successful, transferred 190 923 591 bytes in 170 seconds PHP ftp_put() Transferred 190 923 591 bytes in 1563 seconds