#25314 [Opn->Csd]: ASCII mode doesn't work
| From: | pollita@php.net | Date: | Mon, 08 Sep 2003 22:43:42 +0000 |
| Subject: | #25314 [Opn->Csd]: ASCII mode doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47283@lists.php.net to get a copy of this message | ||
ID: 25314
Updated by: pollita@php.net
Reported By: phpbugs at brianmertens dot com
-Status: Open
+Status: Closed
Bug Type: FTP related
Operating System: Windows
PHP Version: 4.3.3
New Comment:
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 http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Give snaps a chance to build a new version, but it should be all fixed
now.
Previous Comments:
------------------------------------------------------------------------
[2003-09-07 19:57:13] sniper@php.net
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 );
?>
------------------------------------------------------------------------
[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