php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24919 PHP File Uploads in RAM
Submitted: 2003-08-02 12:16 UTC Modified: 2003-08-03 05:02 UTC
From: jgiglio at smythco dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
24 - 14 = ?
Subscribe to this entry?

 
 [2003-08-02 12:16 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-02 12:28 UTC] 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 13:26 UTC] 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 13:38 UTC] eru@php.net
There's an inofficial patch for progress-bars, you can find it at http://pdoru.from.ro/
 [2003-08-03 05:02 UTC] sniper@php.net
PHP does NOT store the entire file in memory. (since version 4.2.0)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC