[thelist] PHP force download of file?

Ivo P ipletikosic at gmail.com
Thu Feb 17 17:33:17 CST 2005


Not sure what to tell you with this. I was having a similar issues a
while ago where it seemed the upload thread just vanished, but it was
because I had to do all kinds of processing on the uploads. I think a
combination of max_execution_time, memory_limit, post_max_size,
upload_max_filesize did the trick. My dev box currently have them set
to 900, 300M,256MB,256MB & i can upload huge files with no
problems....these settings are likely not optimal tho.

good luck!

ivo


On Thu, 17 Feb 2005 13:03:44 -0500, Theodore Serbinski
<stanson at gmail.com> wrote:
> Nice! Yeah that code seems to work great for prompting downloads.
> 
> What about uploads though? I have the php.ini max file size set to 2M
> and MAX_FILE_SIZE set to 2M as well. If I upload a 3M file, I get
> "file too big" error. But if I try to upload a really big file, like
> 80M in size, it tries to upload, and refreshs page, but no error or
> anything. File isn't uploaded as well. Any ideas?
> 
> ted
> 
> 
> On Thu, 17 Feb 2005 08:44:42 -0800, Ivo P <ipletikosic at gmail.com> wrote:
> > This code is part of an app that manages access to ~10,000 internal
> > documents for ~2,000 users. Largest file today is 63MB.
> > > >
> > > > Header( "Content-Type: application/octet-stream" );
> > > > Header( "Content-Length:" . filesize( $filepath ) );
> > > > Header( "Content-Disposition: attatchment; filename=$filename" );
> > > > readfile( $filepath );
> > >
> >
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


More information about the thelist mailing list