From: sam dot bryan at montal dot com
Operating system: All
PHP version: 5.2.1
PHP Bug Type: Feature/Change Request
Bug description: Unable to gracefully handle when max_post_size exceeded with file uploads

Description:
------------
There is, as far as I can discern, no mechanism for detecting exceeded
max_post_size when dealing with file uploads.

Setting max_post_size >= upload_max_filesize is a good safety for single
files, but when uploading multiple files is of no use, as individual files
can be within upload_max_filesize but can cumulatively exceed
max_post_size.

The php://input wrapper and $HTTP_RAW_POST_DATA aren't populated when data
is posted with enctype multipart/form-data, otherwise that'd be a simple
way of checking the POST data size.

My request is for a method of detecting when max_post_size is exceeded, so
it can be handled gracefully within a script. Having php://input filled
when data is of multipart/form-data would do nicely.


--
Edit bug report at [url]http://bugs.php.net/?id=40605&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40605&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40605&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40605&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40605&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40605&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40605&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40605&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40605&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40605&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40605&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40605&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40605&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40605&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40605&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40605&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40605&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40605&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40605&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40605&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40605&r=mysqlcfg[/url]