Edit report at https://bugs.php.net/bug.php?id=46531&edit=1
ID: 46531 Updated by: [email protected] Reported by: jmichae3 at yahoo dot com Summary: ftp_put returns error on Accepted data connection -Status: Re-Opened +Status: Closed Type: Bug Package: FTP related Operating System: All PHP Version: 5.2.6 -Assigned To: +Assigned To: rasmus Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-11-01 17:52:17] sales at 2k3servers dot com This is caused by the bug I posted about yesterday: https://bugs.php.net/bug.php?id=60183 (has been fixed in SVN today) ------------------------------------------------------------------------ [2010-07-09 00:28:57] [email protected] This bug is still encountered today and there's definitely a problem with ext/ftp on this point. Using this class for example works completely fine : http://www.spencernetwork.org/ftp/ftp-class.txt I suspect that when a certain amount of transfered data is reached, over one or more STOR commands, the upload socket goes wrong. ------------------------------------------------------------------------ [2009-02-01 10:03:34] info at vuk dot bg dot it Environment ------------ PHP Version 5.2.4-2ubuntu5.3 Apache 2.0 Application: zip files http upload, decompression on webserver, ftp directory creation and files ftp transfer to remote ftp server; Situation: a zip file with 2 directories within, each containig one file; Reproduce Code -------------- if(!ftp_put($this->conn_id,$target,$tmp_file_name,$ftp_mode)){ ....//set debug information } $ftp_mode is 2 Actual Result ------------- The two files have been transfered correctly but the second operation gave this error:Warning: ftp_put() [function.ftp-put]: Accepted data connection ------------------------------------------------------------------------ [2008-11-18 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2008-11-11 06:49:50] jmichae3 at yahoo dot com I will not be able to reproduce this bug until something on the network goes nuts again. in my case, it was my cable modem configuration combined with an ISP network upgrade. after persistently trying to get an internet connection again (and many calls to tech support), I did. All is well now with my connection so I can't test the Accepted data connection error, but I did test mkdir and it appears to be working. //ftp mkdir test function mk($conn_id) { echo "chdir\n"; if (!ftp_chdir($conn_id, "/public_html/")) { echo "chdir failed\n"; return; } echo "mkdir test\n"; if (!ftp_mkdir($conn_id, "/public_html/test")) { echo "mkdir failed\n"; return; } echo "chdir test\n"; if (!ftp_chdir($conn_id, "/public_html/test")) { echo "chdir failed\n"; return; } } // set up basic connection $conn_id = ftp_connect($host); // login with username and password $login_result = ftp_login($conn_id, $uid, $pwd); // check connection if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!\n"; echo "Attempted to connect to $host for user $uid\n"; exit; } else { echo "Connected to $host, for user $uid\n"; } ftp_pasv($conn_id, true); mk($conn_id); // close the FTP stream ftp_close($conn_id); ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=46531 -- Edit this bug report at https://bugs.php.net/bug.php?id=46531&edit=1
