php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32948 $HTTP_RAW_POST_DATA is empty if form's enctype="multipart/form-data"
Submitted: 2005-05-05 03:10 UTC Modified: 2005-07-14 14:32 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: chaz_meister_rock at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: *
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: chaz_meister_rock at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-05-05 03:10 UTC] chaz_meister_rock at yahoo dot com
Description:
------------
$HTTP_RAW_POST_DATA is empty when using a form with enctype="multipart/form-data" set.

php.ini contains
always_populate_raw_post_data = On

this issue looks similar to:
http://bugs.php.net/bug.php?id=23765



Reproduce code:
---------------
<?php
echo $HTTP_RAW_POST_DATA;
?>
<form enctype="multipart/form-data" method="post">
<input type="text" name="it" value="groovy" />
<input type="file" name="upFile" />
<input type="submit" />
</form>

Expected result:
----------------
it=groovy&upFile=


Actual result:
--------------
Notice: Undefined index: HTTP_RAW_POST_DATA


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-06 03:02 UTC] sniper@php.net
HTTP_RAW_POST_DATA is NOT set for multipart forms.
Would be nice if this was said in the manual too.

 [2005-05-06 18:40 UTC] chaz_meister_rock at yahoo dot com
agreed, this really needs to be in the docs, because without some explanation, it sure sounds like a bug (with a setting like ALWAYS_populate_raw_post_data).

does this mean that there is no way to get to a full enctype="multipart/form-data" HTTP request using php?
 [2005-05-07 08:39 UTC] philip@php.net
When $HTTP_RAW_POST_DATA exists is up for some debate. When this issue is tackled also refer to php://input as the preferred method. Here:

http://marc.theaimsgroup.com/?t=96437871200002&r=1&w=2

Also, it looks like chaz attempted to use $_SERVER as well which of course will never work but anyway that's of no matter...
 [2005-07-14 14:32 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"$HTTP_RAW_POST_DATA is not available with enctype="multipart/form-data"."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 08:01:33 2024 UTC