Forum Moderators: coopster

Message Too Old, No Replies

max. downloadable file size?

         

sunny7day

12:56 pm on Mar 20, 2010 (gmt 0)

10+ Year Member



Hi

I'm new to linux and Apache.
I want to know what is limiting the maximum file size that I can download from my own server.

My server have files over 2GB, when I download it via the php script on my server, it says it can't find the file. But if I download it directly without the php script, I can.

Is there a way to completly switch off the file size limitation?

The php script I am using is to prevent bandwidth leeching.

Matthew1980

2:07 pm on Mar 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there sunny7day,

Just have a read of this, quite an informative article:-

[php.net ]

This states the 8M is the biggest file download, I know that the upload limit is set in the php.ini file, and is (I think) set to 2M.

I hope that this is what you were referring to ;-p

Cheers,
MRb

sunny7day

2:36 pm on Mar 20, 2010 (gmt 0)

10+ Year Member



thank you for your reply Matthew

But I'm afread 8M is not the max limit of php supported, becuase I can download a file bigger than that.

As I don't know anything about php coding, is there a more simple way to overide the limit?

What setting in the server should I adjust?

penders

5:11 pm on Mar 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



2GB - sounds like some kind of 32-bit system limit? For example... PHP is presumably streaming this file and may be keeping track of the number of bytes written? PHP's signed integers have a max of 2147483647. In bytes, this is 2GB. But I'm guessing. Linux has historically had issues with a 2GB file size limit - but you are able to download it directly OK.

sunny7day

8:50 am on Mar 22, 2010 (gmt 0)

10+ Year Member



Well I don't think it's the 32-bit system limit.
By the way, I'm using this script:
[dsplus.sourceforge.net...]

jatar_k

1:06 pm on Mar 22, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if the error you are getting says it can't find the file then size is not your issue. Try checking paths and permissions first

sunny7day

4:10 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



thanks for reply
But when I download a 3GB file, for example, it says can't find the file. But a 1.6GB is ok.

jatar_k

5:52 pm on Mar 22, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is anything different in how the 2 download aside from size?

though maybe the script you are using is returning the error based on something else.

Have you looked at the code it uses where that error message comes up? Maybe you can find where it is being limited