#24919 [Bgs]: PHP File Uploads in RAM
ID: 24919
Updated by: sniper@php.net
Reported By: jgiglio at smythco dot com
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: Irrelevant
New Comment:
PHP does NOT store the entire file in memory. (since version 4.2.0)
Previous Comments:
------------------------------------------------------------------------
[2003-08-02 13:38:07] eru@php.net
There's an inofficial patch for progress-bars, you can find it at
http://pdoru.from.ro/
------------------------------------------------------------------------
[2003-08-02 13:26:05] jgiglio at netmar dot com
Correct me if I am wrong, but since PHP caches the whole file in RAM
before writing it out, that temp file name would be useless for
purposes for letting the user know the progress of their upload (such
as percentage complete).
------------------------------------------------------------------------
[2003-08-02 12:28:56] eru@php.net
From http://www.php.net/manual/en/features.file-upload.php
:
"Files will by default be stored in the server's default temporary
directory, unless another location has been given with the
upload_tmp_dir directive in php.ini."
"$_FILES['userfile']['tmp_name'] The temporary filename of the file in
which the uploaded file was stored on the server."
------------------------------------------------------------------------
[2003-08-02 12:16:42] jgiglio at smythco dot com
Description:
------------
PHP loads entire uploaded files into RAM, which makes the feature
useless except for toy websites. PHP should be smart enough to spool
large uploads to disk, like CGI.pm does.
It would also be very nice if there were a way to get the name of the
temp file spooled to, so that the user can be given feedback on their
upload as it progresses, but this is not necessary.
I'm putting this in as a feature request, because I know you guys don't
consider it a bug.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24919&edit=1
Thread (5 messages)