ID: 27633 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Closed +Status: Open Bug Type: FTP related Operating System: Windows XP -PHP Version: 4.3.5RC3 +PHP Version: 4.3.8 New Comment:
\n becomes \r\r\n in PHP 4.3.8. \n becomes \r\r in PHP 5.0.0 (last \n becomes \r\r\n). Previous Comments: ------------------------------------------------------------------------ [2004-07-23 16:38:01] a dot hoekstra at boxitbv dot nl Upgraded from 4.3.1 to 4.3.8. After upgrade I got extra <cr> at end of line when ftp in ascii mode from unix host to xp client. In case of large file (+3kb) missing tail of file and no error message! Downgraded again to 4.3.1 to make things work :-(. ------------------------------------------------------------------------ [2004-03-18 12:07:48] [EMAIL PROTECTED] This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2004-03-18 07:27:30] [EMAIL PROTECTED] Description: ------------ ftp_get() translates \n characters wrong in FTP_ASCII mode. Instead of \r\n, they become \r on Windows. Only newline at the end of a file (if any) is translated correct. \r\n on remote server become \r\r. Reproduce code: --------------- <?php $ftp = ftp_connect("ftp.netscape.com"); ftp_login($ftp, "anonymous", "anonymous"); ftp_pasv($ftp, true); ftp_get($ftp, "Welcome", "Welcome", FTP_ASCII); ftp_close($ftp); ?> Expected result: ---------------- \r\nWelcome ...\r\n Actual result: -------------- \rWelcome ...\r\n ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27633&edit=1