From: afuzaylov at mlgpro dot com Operating system: windows xp PHP version: 5.2.0 PHP Bug Type: Unknown/Other Function Bug description: ftp_put() function is very slow
Description: ------------ Hi. I have created a small php file to FTP .swf files to another server. It seems to run very very slow compared to another FTP program. It takes filezilla 1.5 minutes to upload 31MB .swf file, while it takes PHP to upload it about 3 hours. I am running on windows xp apache2, PHP 5.2. Reproduce code: --------------- function ftp($file_name) { $conn_id = ftp_connect(FTP_SERVER); $login_result = ftp_login($conn_id, FTP_USERNAME, FTP_PASSWORD); if ($conn_id && $login_result) { set_time_limit(60 * 60 * 4); // 4 hours from now $upload = ftp_put($conn_id, FTP_PATH . $file_name, DIRECTORY_DESTINATION . $file_name, FTP_BINARY); } ftp_close($conn_id); if ($upload) { return TRUE; } return FALSE; } $file_name = "test.swf"; $uploaded = ftp($file_name); if ($uploaded) { // do something } else { // do something } } Expected result: ---------------- It should not take 3 hours to upload a file while it takes other FTP programs less than 2 minutes. -- Edit bug report at http://bugs.php.net/?id=40389&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40389&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40389&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40389&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40389&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40389&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40389&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40389&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40389&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40389&r=support Expected behavior: http://bugs.php.net/fix.php?id=40389&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40389&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40389&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40389&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40389&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40389&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40389&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40389&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40389&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40389&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40389&r=mysqlcfg