php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29060 more settings to current main/rfc1867.c implement logic
Submitted: 2004-07-08 08:32 UTC Modified: 2013-08-02 01:00 UTC
From: xuefer at 21cn dot com Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.3.7 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xuefer at 21cn dot com
New email:
PHP Version: OS:

 

 [2004-07-08 08:32 UTC] xuefer at 21cn dot com
Description:
------------
the current "resource control" logic main/rfc1867.c implemented is not pretty enough.
it didn't take enough care of server resources when user upload "too large" file
issue 1. memory
i'd like to set post_max_size=2M or 3M etc.
but i can't, cos upload file size often exceeds this limit.
then i let it be 8M, but how if someone just post a 8m text(not file)? 8M data is get into php's memory, just 10 users can make php use 80MB memory, well there is memory_limit, but it seems only good for "php script execution memory usage", the $_POST size should be calc "alone"

issue 2. network traffic
i'd like to tune upload_max_size=8M (each file).
some user can only upload 1M pre file, we can set MAX_FILE_SIZE="<?=1024*1024?>", but then? php read up to 1M, and notice it exceeded MAX_UPLOAD_SIZE. canceling upload, starting to execute phpscript. this however waste 1Mbyte traffic, which is 8Mbits(also waste of time, _bad_ user experience)

issue 3. temp disk usage
when i set upload_max_size=1M, and post_max_upload=8M
with 8 multi uploads, each 1M, can eat up 8M disk usage(temp file).
well this isn't a teribble issue. at least, disk is always larger than memory

it's nice if we can control:
max $_POST size
	ini=?? (for "issue 1", memory usage)
	form=not needed
max Request-Content-Length
	ini=post_max_size
	form=??? (for "issue 2", cancel upload ASAP)
max size per file
	ini=upload_max_filesize
	form=MAX_FILE_SIZE
max total file size
	ini=needed?
	form=needed?
ini means: hard set in ini
form means: soft set in form,



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-02 01:00 UTC] yohgaki@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2013-08-02 01:00 UTC] yohgaki@php.net
You can work around these limitations by using PERDIR ini setting and/or 
dedicated virtual server ini setting.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC