php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18618 Become too slow actions when I cancel file download.
Submitted: 2002-07-29 00:36 UTC Modified: 2002-07-29 06:02 UTC
From: youngga at hotmail dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.2.2 OS: redhat 7.2
Private report: No CVE-ID: None
 [2002-07-29 00:36 UTC] youngga at hotmail dot com
I have make download a file by using fopen() function.
my code is here.
-----------------------------------------------------
$down_file= "myfolder/myfile" 
if(@$fp=fopen($down_file, "r" )) 
{ 
  Header("Content-type: application/save-as"); 
  Header("Content-Disposition:attachment; filename=".$file_name);  
  Header("Content-Description: PHP3 Generated Data"); 
  while( $data=fread( $fp,filesize($down_file) ) ) 
	{ 
		print($data); 
	}
}
--------------------------------------------------------
When I download a file in my browser and cancel download, the next actions are very slow.
What is the problem?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-29 02:11 UTC] yohgaki@php.net
Category: Filesystem function related -> Performance problem
It sounds like a dup, but I'm not sure.

Could you try latest CVS snap 
http://snaps.php.net/

 [2002-07-29 03:37 UTC] youngga at hotmail dot net
It may problem of browser.
There is no problem On Netscape.
The problem is occered only session related pages on IE.

When I changed header from Content-Disposition:attachment to inline. Problem is OK.
But I should use it as attachment.
So, I want know solve the problem.
 [2002-07-29 06:02 UTC] sniper@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. 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

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 05:01:23 2019 UTC