Page 1 of 1

file download script give me "unknown file size" ?

Posted: Thu Oct 30, 2008 4:01 am
by godsquare
Dear All,

I use "File Download 1.3" from http://www.zubrag.com/scripts/ for a while and it work great.

But today, I change my webhosting. The same script give me "unknown file size" instead of file's actually size it used to give me.

I think major factor is the same between 2 webhosting (eg. php version, disable function, etc)

Anyidea how it's happen ? How to solve this issue ?

Here is screenshot

Download from old server
Image

Download from new server
Image

Any suggestion will be appreciated,

Re: file download script give me "unknown file size" ?

Posted: Thu Oct 30, 2008 9:57 am
by pickle
I'm not sure exactly how to fix this, but I think I know the reason why.

Is the file you're downloading being generated dynamically? Is it being run through a proxy PHP file? It's likely that the Content-Length header isn't being sent properly or at all. As a result, the browser doesn't know the total length (size) of the file & therefore can't tell you.

Re: file download script give me "unknown file size" ?

Posted: Fri Oct 31, 2008 6:37 am
by godsquare
pickle wrote:I'm not sure exactly how to fix this, but I think I know the reason why.

Is the file you're downloading being generated dynamically? Is it being run through a proxy PHP file? It's likely that the Content-Length header isn't being sent properly or at all. As a result, the browser doesn't know the total length (size) of the file & therefore can't tell you.
Dear pickle,

Thank you for your answer.

But inn this case, file is exist in the server (not generate dynamically) :cry: