ID:               25314
 Updated by:       [EMAIL PROTECTED]
 Reported By:      phpbugs at brianmertens dot com
 Status:           Open
 Bug Type:         FTP related
 Operating System: Windows
 PHP Version:      4.3.3
 New Comment:

This works as workaround:

<?php

$conn = ftp_connect( "server" );
ftp_login( $conn, "user", "pass" );
$fp = fopen('localfile.txt', 'wt');
ftp_fget( $conn, $fp, 'remotefile.txt", FTP_BINARY );

?>




Previous Comments:
------------------------------------------------------------------------

[2003-08-29 13:23:35] phpbugs at brianmertens dot com

Description:
------------
This seems to be the same problem as 19036 (Closed) and 18162 (No
Feedback).

Since neither is still open, I am filing a new report. I will provide
any feedback required. I can test snaps if they are compiled for
Windows.

Simply put, if I connect to a Unix (AIX 4.3) server and use ftp_get()
to fetch a text file to a Windows machine with the FTP_ASCII option,
the newlines are NOT converted to CR/LF pairs.

ftp_get( $conn, "file.txt", "file.txt", FTP_ASCII );

I have reproduced this with 4.2.x, 4.3.2 & 4.3.3.

(Note that ftp_systype() returns "UNKNOWN".)

Reproduce code:
---------------
$conn = ftp_connect( "server" );
ftp_login( $conn, "username", "password" );
ftp_get( $conn, "file.txt", "file.txt", FTP_ASCII );


Expected result:
----------------
Lines terminated with CR/LF pairs (x0D x0A).

Actual result:
--------------
Lines terminated with single x0A chars.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25314&edit=1

Reply via email to