[nycphp-talk] Does PHP have file size download limits? Bestpractice?
Michele Waldman
mmwaldman at nyc.rr.com
Mon May 16 22:38:11 EDT 2011
I'm still alive.
--------------------------------------------------
From: "Dan Cech" <dcech at phpwerx.net>
Sent: Monday, May 16, 2011 2:22 PM
To: <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] Does PHP have file size download limits?
Bestpractice?
> On 5/16/2011 2:16 PM, David Roth wrote:
>> I want to offer users to be able to download a file from a PHP script. I
>> seem to remember there were/are file size download limits with PHP?
>
> You're probably thinking of the php ini settings that affect file uploads.
> The issues you're likely to run into offering large downloads are
> indirect; memory limits can be a problem if you have to buffer the entire
> file into memory in PHP.
>
> If you can stream it out to the client instead you can offer virtually
> unlimited file sizes. You may need to extend the maximum execution time
> to avoid having your script cut off mid-download.
>
>> Also
>> what is the best practice for doing this with a PHP script? Thanks!
>
> Best practice would include providing proper HTTP headers according to
> your situation, including Content-Disposition (with filename) and
> Content-Length so the browser's download progress meter will work
> properly.
>
> Dan
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
More information about the talk
mailing list