#23765 [NEW]: No raw post data from multipart forms
From: bugs dot php dot com at brome dot com
Operating system: Slackware Linux
PHP version: 4.3.1
PHP Bug Type: Variables related
Bug description: No raw post data from multipart forms
I'm trying to receive HTTP POST file uploads from an embedded device. For
some reason, PHP isn't recognizing the file data correctly, and the file
data is showing up in $_POST instead of $_FILES. Unlike a bug reported by
someone else, the POST vars are coming through just fine.
So I'd like to use $HTTP_RAW_POST_DATA or php://input to parse it
manually, but both are empty whenever receiving multipart form-data, which
of course is necessary, and is hard-coded into the device.
Trying to make a similar request using a test form and a regular browser,
again both $HTTP_RAW_POST_DATA and php://input are empty, but if I simply
remove enctype="multipart/form-data" from the form, I can then see the
full raw input using both methods.
Here's the test form:
<form enctype="multipart/form-data" action="upload_photo_action.php"
method="post">
<p>DirId: <input type=text name="DirId" value="1"></p>
<p>Filename: <input type=text name="Filename"></p>
<p>Send this file: <input type=file name="ImageData"></p>
<input type=submit value="Send File">
</form>
...and here's my config line:
'./configure' '--prefix=/usr/local/apache/php' '--with-jpeg-dir'
'--with-mysql=/usr/local/mysql' '--enable-trans-sid'
'--enable-track-vars'
'--enable-bcmath' '--enable-ftp' '--with-gd'
'--with-png-dir'
'--with-zlib-dir' '--with-openssl=/usr/local/ssl'
'--with-apxs=/usr/local/apache/bin/apxs'
Thanks!
--
Edit bug report at http://bugs.php.net/?id=23765&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23765&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23765&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23765&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23765&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23765&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23765&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23765&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23765&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23765&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23765&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23765&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23765&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23765&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23765&r=gnused
Thread (9 messages)
- bugs dot php dot com at brome dot com