#23454 [Ver]: Combining GET and POST array values is broken
| From: | sniper@php.net | Date: | Mon, 05 May 2003 22:43:42 +0000 |
| Subject: | #23454 [Ver]: Combining GET and POST array values is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39116@lists.php.net to get a copy of this message | ||
ID: 23454
Updated by: sniper@php.net
-Summary: Combining GET and POST array values with
register_globals=on
Reported By: oregon at pobox dot com
Status: Verified
Bug Type: *General Issues
Operating System: ANY
-PHP Version: 4.3.2RC2
+PHP Version: 4.3.2RC3-dev
New Comment:
Here's a bit more extended version of the test script,
including cookies too:
<?php setcookie("person[fname]", "foobar"); ?>
<form action="bug23454.php?person[age]=27" method=post>
<input type=text size=32 name="person[sname]">
<input type=submit>
</form>
<pre>
<?php
echo phpversion();
echo '<br>register_globals = ', ini_get('register_globals'),
'<br>';
print "_GET: "; print_r($_GET);
print "_POST: "; print_r($_POST);
print "_COOKIE: "; print_r($_COOKIE);
print "_REQUEST: "; print_r($_REQUEST);
print "person: "; print_r($person);
?>
</pre>
Previous Comments:
------------------------------------------------------------------------
[2003-05-04 10:41:01] sniper@php.net
4.2.3
register_globals = 1
_REQUEST: Array
(
[person] => Array
(
[age] => 27
[sname] => fgfg
)
)
_GET: Array
(
[person] => Array
(
[age] => 27
[sname] => fgfg
)
)
_POST: Array
(
[person] => Array
(
[age] => 27
[sname] => fgfg
)
)
person: Array
(
[age] => 27
[sname] => fgfg
)
------------------------------------------------------------------------
[2003-05-04 10:18:56] sniper@php.net
4.3.1
register_globals = 1
_REQUEST: Array
(
[person] => Array
(
[sname] => fgfg
)
)
_GET: Array
(
[person] => Array
(
[age] => 27
)
)
_POST: Array
(
[person] => Array
(
[sname] => fgfg
)
)
person: Array
(
[sname] => fgfg
)
------------------------------------------------------------------------
[2003-05-04 10:18:13] sniper@php.net
4.3.2-RC3-dev
register_globals = 1
_REQUEST: Array
(
[person] => Array
(
[sname] => fgfg
)
)
_GET: Array
(
[person] => Array
(
[age] => 27
)
)
_POST: Array
(
[person] => Array
(
[sname] => fgfg
)
)
person: Array
(
[sname] => fgfg
)
------------------------------------------------------------------------
[2003-05-02 18:40:57] philip@php.net
This might be related to closed bug #20796:
http://bugs.php.net/20796
Marking this one (#23454) critical as it makes autoglobals unreliable
and register_globals should work too. btw, track_vars doesn't exist
anymore, it's always on.
------------------------------------------------------------------------
[2003-05-02 18:30:13] michael dot mauch at gmx dot de
It's not only with about register_globals=on, the GET data are also
missing from $_REQUEST if register_globals=off.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23454
--
Edit this bug report at http://bugs.php.net/?id=23454&edit=1