php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63444 download ling probem
Submitted: 2012-11-05 22:24 UTC Modified: 2012-11-05 23:00 UTC
From: engineer dot mahmoud22 at yahoo dot vom Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 5.4.8 OS: windows 7
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: engineer dot mahmoud22 at yahoo dot vom
New email:
PHP Version: OS:

 

 [2012-11-05 22:24 UTC] engineer dot mahmoud22 at yahoo dot vom
Description:
------------
when i download file , the file is corrupt becouse it download only 65 kbyte from the file although the size of the file is 10 mega 
and the files type i download is documents word and pdf file



Test script:
---------------
<?php 
session_start();
if(isset($_GET['pro_Id_down'])){
}
require("index.php");
$pro_Id_down = $_GET['pro_Id_down'];
$sqldown = "select * from proposal where P_Id= '$pro_Id_down'";
$query = mysql_query($sqldown);
$result = mysql_fetch_assoc($query);
$type = $result['type'];
$file = $result['File'];
$size = $result['size'];
$name = $result['filename'];

header("Content-type: $type");
header("Content-type: $type");
header("Content-length: $size");
header("Content-Disposition: filename = $name ");
header("Cache-control: private");
header('Content-Transfer-Encoding: binary');
   
 echo $file;
?>

Expected result:
----------------
when downloading the file the file download stoped at 65 kbyte and file corrupt 

Actual result:
--------------
what can i do please ??

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-05 23:00 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 [2012-11-05 23:00 UTC] johannes@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-2020 The PHP Group
All rights reserved.
Last updated: Wed Feb 26 07:01:26 2020 UTC