|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32678 An extra Line Feed ( 0x0A) is added when downloading Files
Submitted: 2005-04-11 21:46 UTC Modified: 2005-04-19 14:49 UTC
From: kosuri dot s dot raju at chase dot com Assigned:
Status: Closed Package: iPlanet related
PHP Version: 4.3.10 OS: Win 2000 (build 2195), SP4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
17 - 2 = ?
Subscribe to this entry?

 [2005-04-11 21:46 UTC] kosuri dot s dot raju at chase dot com
     Windows 2000, V5.0.2195 SP 4
     Sun one Webserver 6.1  SP2
     PHP 4.3.10 (cgi-fcgi) (built: Dec 14 2004 17:47:59)

     Using NSAPI
     Browser: IE6.0
When dowloading a file ( both text and Binary files ), an extra LF Character (0x0A) is always prepende to the output.  This is only happening in the above environment.   The data is stored properly on the MySql Server.  Works OK on Windows XP , SP2 ( environment)  

Reproduce code:
Sample Code:

$inData = // Read Data from mySQL
$ctype = "text/plain" ; // or like appilcation/msword
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-type: $ctype");
header( "Content-Disposition: attachment; filename=".$filenam );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$filesize);

Expected result:
The output should not contain additional LineFeed character at the start of output

Actual result:
<LF>  --- This is Extra Linefeed ( 0x0A)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-12 00:02 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-04-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-04-19 14:49 UTC] kosuri dot s dot raju at chase dot com
An extra Line was there in an iclude file after the PHP 
End Tag "?>".

Issue is resolved.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 07:01:28 2024 UTC