|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26113 ftp_get on non-existen file creates a o byte file
Submitted: 2003-11-04 09:02 UTC Modified: 2003-11-04 15:55 UTC
From: jcastro at elnuevodia dot com Assigned:
Status: Closed Package: FTP related
PHP Version: 4.3.3 OS: windows xp
Private report: No CVE-ID: None
 [2003-11-04 09:02 UTC] jcastro at elnuevodia dot com
If I use ftp_get  and the $server_file does not exist on the server,  I will get a zero byte file created in my machine with the name that I put in the $local_file variable. 

I am running php 4.3.3 on windows xp prof 

Reproduce code:
@ftp_get($conn_id, $local_file, $server_file, FTP_BINARY))

Expected result:
No file should be created since the server_file did not exits

Actual result:
a zero byte file is created


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-04 15:55 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 10:01:26 2024 UTC