|  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
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: jakub at icewarp dot com
New email:
PHP Version: OS:


 [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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-25 05:55 UTC]
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
 [2002-06-06 05:37 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 18 21:01:24 2021 UTC