RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs
| From: | Jim Moseby | Date: | Thu, 07 Jun 2007 18:17:23 +0000 |
| Subject: | RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-256307@lists.php.net to get a copy of this message | ||
>
> > Rumor has it that uploaded files are stored in memory before being
> > committed
> > to disk. If so, the amount of free RAM available to PHP
> would be the limit
> > to the filesize regardless of the ini file settings.
>
> I don't think that is the case. File is written to temp
> directory as it is
> uploaded.
> And the qeustion is of php having negative values after I
> specify post size
> limit to 4G
>
There is a comment in the documentation for move_uploaded_file() that
indicates the entire file is saved in memory prior to writing to the
temporary upload area. Maybe this is not true. Read it for yourself. Its
just a comment, so who knows?
Also, there is an indication that you may need to tweak memory_limit in
php.ini.
> > You should probably use another method of transport for
> files that large.
> > FTP immediately comes to mind.
>
> You mean ftp client? Like cute ftp. If yes, the problem is
> that along with
> uploading the file I also have to update database to
> associate that file
> with some user etc. It needs to be web based.
>
After a quick search I found an applet that handles file uploads, and can
use FTP as the transport protocol.
http://radinks.com/upload/
JM