php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15692 ISAPI fputs \n = \r\n
Submitted: 2002-02-23 18:51 UTC Modified: 2002-06-06 05:37 UTC
From: jakub at icewarp dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.1.1 OS: Any Windows platform
Private report: No CVE-ID: None
 [2002-02-23 18:51 UTC] jakub at icewarp dot com
The PHP.EXE CGI treats this code snippet:
...
fwrite($file, "\r\n");
...
exactly as expected. However the ISAPI.DLL version
converts "\n" to "\r\n" so the real output in the file is:
"\r\r\n"

Is there a place in the source code where I can make the ISAPI filter to be compiled without the conversion? I think it's a bug anyway.
Thank you
Cheers
Jakub

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-25 05:55 UTC] hholzgra@php.net
how do you open $file? have you used the "b" mode character to enforce binary safe output?
 [2002-02-25 16:08 UTC] jakub at icewarp dot com
You are certainly right it works with the "B" flag. However I wonder why the CGI module works different than ISAPI (both without "B"). It's not a problem I just wanted to let you know.
Thank you
Cheers
Jakub
 [2002-06-06 05:37 UTC] sander@php.net
PHP on Windows converts \n to \r\n in output, and \r\n to \n in input. Not a bug, expected behaviour.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC