Sunday, November 10, 2002, 3:45:14 AM, Philip Olson wrote:
> This will be documented as soon as we figure out where to document it.
> Many months ago the predefined variables section of the manual was
> redone and the vars are now separated autoglobals.
> + Contains the RAW POST data. For this variable to exist,
> + there must be a POST request and either the mime type of
> + the POST data must be unrecoginized or the PHP directive
> + <link linkend="ini.always-populate-raw-post-data">
> + always_populate_raw_post_data</link> is set to
> + <emphasis>on</emphasis>.
That would be a start, but this is not the behavior I am seeing.
Using this script:
<html>
<head><title>test_post_data.php</title></head>
<body>
<h1>Input</h1>
<form action="<?php echo $PHP_SELF; ?>" method="post">
Send this post data: <input name="data" type="text">
<input name="op" type="submit" value="Post">
</form>
<h1>Output</h1>
$_POST:
<pre><? var_dump($_POST); ?></pre>
$HTTP_RAW_POST_DATA
<pre><? var_dump($HTTP_RAW_POST_DATA); ?></pre>
</body>
</html>
I get this output when always_populate_raw_post_data is off:
$_POST:
array(2) {
["data"]=>
string(4) "Test"
["op"]=>
string(4) "Post"
}
$HTTP_RAW_POST_DATA
NULL
Unless I am misunderstanding $HTTP_RAW_POST_DATA should contain
string(17) "data=Test&op=Post", as it does when
always_populate_raw_post_data is on.
--
Kjartan <[EMAIL PROTECTED]> (http://natrak.net/)
:: "Those who never retract their opinions love themselves more
than they love the truth." - Joseph Joubert
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php