View Issue Details

IDProjectCategoryView StatusLast Update
0004004mantisbtbugtrackerpublic2004-11-06 06:02
Reporterpengzhw Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version0.19.1 
Summary0004004: unable to download large size attachment
Description

I'v successfully uploaded an attachment file of 9MB for a bug. But when viewing the bug/issue, I find that the file is unable to be downloaded to the browser side. No error messeage appears either inside Apache error_log or at the Mozilla web browser. However IE says the URL is unavailable when I try to download the attachment.

Additional Information

PHP Version 4.2.2, Apache 1.3.27,Red Hat Linux 7.3
php.ini:
memory_limit 16M
post_max_size 108M
upload_max_filesize 102M

config_inc.php:
$g_file_upload_method = DISK;

Btw, I'v checked the md5sum to make sure the attachement file, a Microsoft Word file, is correctly uploaded to the server.

TagsNo tags attached.
Attached Files
file_download.php.patch (479 bytes)   
--- file_download.php.rev.1.25.4.1	2004-08-13 22:54:35.000000000 +0800
+++ file_download.php	2004-08-13 22:54:06.000000000 +0800
@@ -69,6 +69,8 @@
 	header( 'Content-Length: ' . $v_filesize );
 	header( 'Content-Disposition: filename=' . file_get_display_name( $v_filename ) );
 	header( 'Content-Description: Download Data' );
+	header( 'Pragma: no-cache' );
+	header( 'Expires: 0' );
 
 	# dump file content to the connection.
 	switch ( config_get( 'file_upload_method' ) ) {
file_download.php.patch (479 bytes)   
file_download.php.gz (1,136 bytes)

Relationships

related to 0005195 closedthraxisp Project doucmentation: Can upload, cannot download 
related to 0005039 closedthraxisp Download attached files via HTTPS fails 

Activities

pengzhw

pengzhw

2004-07-05 01:11

reporter   ~0005879

P.S.: I am using mantis 0.18.3, and log_errors in php.ini is turned on.

pengzhw

pengzhw

2004-08-13 10:13

reporter   ~0006981

Last edited: 2004-08-13 10:14

I'v modified file_download.php to fix the problem. The attached patch file is against:
file_download.php,v 1.25.4.1 2004/05/10
which is included in mantisbt-0.18.3.

The modified file is also available.

edited on: 08-13-04 10:14

freddy0

freddy0

2004-08-25 09:26

reporter   ~0007151

At first I had a problem uploading files larger than 1MB, which I resolved with "set-variable = max_allowed_packet=2M" in mysql config file (my.cnf).
Now I got another problem: I cannot download those files bigger than 1MB.
The patch provided by mr.pengzhw doesn't seem to work for me.

lsimonch

lsimonch

2004-10-14 04:30

reporter   ~0008030

I have the same problem with
$g_file_upload_method = DATABASE;

And I did the same thing as pengzhw ("set-variable = max_allowed_packet=5M" in mysql config file) to be able to upload such files.

Mandrake 9.2
PHP 4.3.0
Apache 2.0.44

thraxisp

thraxisp

2004-10-15 13:46

reporter   ~0008067

Fixed in CVS