From: xuefer at 21cn dot com Operating system: all PHP version: 4.3.7 PHP Bug Type: Feature/Change Request Bug description: more settings to current main/rfc1867.c implement logic
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, -- Edit bug report at http://bugs.php.net/?id=29060&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29060&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29060&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29060&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29060&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29060&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29060&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29060&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29060&r=support Expected behavior: http://bugs.php.net/fix.php?id=29060&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29060&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29060&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29060&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29060&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29060&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29060&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29060&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29060&r=float