|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51190 ftp_put() returns false when transfer was successful
Submitted: 2010-03-03 05:47 UTC Modified: 2016-11-28 17:41 UTC
From: alexclifford47 at gmail dot com Assigned: iliaa
Status: Re-Opened Package: FTP related
PHP Version: 5.3.1 OS: Windows Server 2003 R2 32-bit
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-03-03 05:47 UTC] alexclifford47 at gmail dot com

I am getting the following warning message when trying to use ftp_put():
Warning: ftp_put(): Transfer OK

This is causing the function to return false, when in fact the file is 

I have Googled this warning message but no one else has ever received it. Where 
this warning coming from and why is PHP reporting a "Transfer OK" as a warning?

Destination server is Windows Server 2008 64-bit running FileZilla Server 
(latest version).


Test script:
$conn_id = ftp_connect($ftp_server);
ftp_login($conn_id, $ftp_user, $ftp_pass);

if (ftp_put($conn_id, 

Expected result:

Actual result:
Warning: ftp_put(): Transfer OK


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-03 15:55 UTC] araje at usimagingnetwork dot com
I'm having the exact same problem..
The upload is successful , however ftp_put returns false...
Any info would be appreciated.
 [2010-03-04 13:52 UTC]
Automatic comment from SVN on behalf of iliaa
Log: Fixed bug #51190 (ftp_put() returns false when transfer was successful).
 [2010-03-04 13:53 UTC]
-Status: Open +Status: Closed
 [2010-03-04 13:53 UTC]
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
Thank you for the report, and for helping us make PHP better.

 [2010-03-05 04:11 UTC] alexclifford47 at gmail dot com
I will give this a try when I get a chance. How long until these fixes are into a 
stable release?
 [2010-03-09 06:10 UTC] alexclifford47 at gmail dot com
I notice you added a check for the 200 response in ftp.c. This didn't fix the 
problem for me. But also adding a check for a 221 response did. Is it possible to 
have this added into the codebase too?
 [2016-11-28 17:41 UTC]
-Status: Closed +Status: Re-Opened
 [2016-11-28 17:41 UTC]
Re-opening according to user comment.
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Apr 23 21:01:34 2017 UTC