|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18162 FTP_ASCII format ignored in the function ftp_fget()
Submitted: 2002-07-04 07:56 UTC Modified: 2002-08-07 01:00 UTC
Avg. Score:4.2 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:4 (80.0%)
From: olivier_amos at yahoo dot fr Assigned:
Status: No Feedback Package: FTP related
PHP Version: 4.2.0 OS: Windows NT and 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: olivier_amos at yahoo dot fr
New email:
PHP Version: OS:


 [2002-07-04 07:56 UTC] olivier_amos at yahoo dot fr
There is a bug with the FTP_ASCII format in the function ftp_fget().
FTP_ASCII seems to be ignored because files downloaded with ftp_fget($stream, $fp, $rf, FTP_ASCII) are in binary format (FTP_BINARY)instead of ascii format.
You can verify it with Windows Notepad editor: in binary format, textsfiles show "squares" instead of "end lines".

Script example:
$list = ftp_nlist($stream, '.');
while(list($k, $v) = each($list)) 
	$fp = fopen("$directory/$v", 'w');
	if (is_resource($fp))
		ftp_fget($stream, $fp, $v, FTP_ASCII);

Does somebody know a solution to force FTP get in ASCII mode?

thanks a lot!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-06 20:42 UTC]
Please try this snapshot:

 [2002-08-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 04:01:30 2024 UTC