Page 1 of 1

Downloading File only up to 4kb

Posted: 03 Apr 2008, 16:47
by zinger
Hello,

I got problems downloading files attached to an issue. This only works up to a file size of very few kilobytes, around 4Kb. Someone (not me) opened a bug: http://www.mantisbt.org/bugs/view.php?id=9016

I don't think it's a bug but a configuration issue, maybe of PHP. I've searched this forum and the web and adjusted post_max_size and upload_max_filesize to 8M. Still does not help.

Honestly I'm lost. Can someone give me a hint what to do?

I like Mantis very much but not being able of downloading attached files is a reason for not using it.
I'm running Manits 1.1.1 on Win2003, MS SQL 2005, IIS 6.0 with PHP 5.2.5

Many thanks

matthias

Re: Downloading File only up to 4kb

Posted: 04 Apr 2008, 09:54
by Antonia
You must change in your php.ini variables: post_max_size and upload_max_filesize and in conf_defaults_inc.php (Mantis-Directory) variable $g_max_file_size. If you get an error you must customize your timeout. That's it!

Antonia

Re: Downloading File only up to 4kb

Posted: 09 Apr 2008, 13:19
by zinger
Antonia wrote:You must change in your php.ini variables: post_max_size and upload_max_filesize and in conf_defaults_inc.php (Mantis-Directory) variable $g_max_file_size. If you get an error you must customize your timeout. That's it!
Thank you for your answer. I double checked this. Everything is set as said.
I also had a look at IIS Server Logs. According to the log the file file_download.php is processed without errors. But just nothing happens when trying to download a file larger than 4 Kb. The error message iin IE just says "Server connection reseted" or something similar, with Firefox nothing happens.

Is there an idea?

matthias

Re: Downloading File only up to 4kb

Posted: 15 Apr 2008, 14:31
by mule22
I have been running into this same problem. Here are a couple things I have dug up:

In order for the files to store properly in MSSQL, you need to change two lines in file_api.php
Have a look at this post for the exact lines and changes :
http://www.mantisbt.org/bugs/view.php?id=6063

Once that is done, your files will be properly stored in the database. However, getting them out is another issue that I am still in the middle of wrestling with. I know the files are now being stored properly, I tested pulling them out with a ColdFusion page and they displayed/saved just fine.

I suspect the issue is somewhere in file_download.php, but I haven't found it yet. Once I do, I'll update this post.

Re: Downloading File only up to 4kb

Posted: 15 May 2008, 15:01
by vzw614
Was anyone able to resolve the issue of downloading/displaying attachments when using SQL Server?

Thanks
Curtis

Re: Downloading File only up to 4kb

Posted: 10 Jun 2008, 12:28
by jensdommaschk
I have the same issue please help

Re: Downloading File only up to 4kb

Posted: 18 Jun 2008, 18:49
by vzw614
Bump on this topic to see if anyone has figured out how to fix this.

Re: Downloading File only up to 4kb

Posted: 18 Jun 2008, 19:11
by vzw614
I figured out how to fix this if you're using MS SQL Server.

First off, you should not have to do any edits to the php files like mule22 suggested. If you take a look at that bug it was fixed a while ago so as long as you're using the latest stable version of Mantis that fix is included.

In your php.ini file locate these 2 settings and change them to the value listed here (the default is only 4kb [4096])

mssql.textlimit = 2147483647
mssql.textsize = 2147483647

Then stop/restart IIS and you should be good to go.

Hope this helps.
Curtis

Re: Downloading File only up to 4kb

Posted: 02 Nov 2016, 01:55
by karen
Hi, I have the same issue. I am using:
The default attachment settings. Firefox, stored in DB
MSSQL as the back-end DB
using PHP 5.6.24 with IIS
Microsoft Windows Server 2012 R2 Data Center
Mantis - mantisbt-2.0.0-beta.2

I also tried in 2.0.0 RC1, downloading creates error on the file.
Retrieving the file doesn't work. It's either garbled or cannot open Excel files, etc.

I think if I downgrade, the issue will persist because it might be a database issue.

I appreciate any help.