php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34258 Problems with download
Submitted: 2005-08-25 21:44 UTC Modified: 2005-08-26 08:56 UTC
From: sillva at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.4.0 OS: Linux 2.4
Private report: No CVE-ID: None
 [2005-08-25 21:44 UTC] sillva at gmail dot com
Description:
------------
Hi,

I think know a bug in php, i have an file in folder (/home/user/file/file.ext), when i try download (with my script), the php insert a "\n" at start of the file.

I try to remove the \n, dont resolve the problem.

I'm sorry for my bad english. If this is not bug ... sorry ... i try find a solution in the google but not happen.





Reproduce code:
---------------
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: $ctype");
header("Content-Disposition: attachment; filename=\"".$nm_layout."\";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$tm_layout);
set_time_limit(0);
readerfile($bn_layout); 

/* the variables have a value, the download is finished and all the content of the file is correct, but the "\n" broken the file */

Expected result:
----------------
Correct file content

Actual result:
--------------
Correct file content but with "\n" at start.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-26 08:56 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 08:01:33 2024 UTC