From: phpbugs at crumpton dot cx
Operating system: redhat 7.3
PHP version: 5.0.2
PHP Bug Type: Unknown/Other Function
Bug description: Post data periods (.) being converted to underscores (_)
Description:
------------
In the key/value pairs from posted data, periods (.) within the key name
(ie, "var.name=some+data") are being converted to underscores (_) (ie,
"var_name=some+data").
$HTTP_RAW_POST_DATA contains the correct urlencoded data with the periods
(.). $_REQUST, $_POST, and $HTTP_POST_DATA, however, all contain keys
with the periods (.) replaced as underscores (_).
Note: The "Reproduce code:" section requires
"always_populate_raw_post_data = On" in php.ini to see the
$HTTP_RAW_POST_DATA... You will, however, see the mangled $_POST variable
either way.
Reproduce code:
---------------
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
header("Content-type: text/plain");
print_r($HTTP_RAW_POST_DATA . "\n");
print_r($_POST);
die;
}
?>
<form method="post">
<input type="text" name="var.name" value="some data" />
<input type="submit" value="submit" />
</form>
Expected result:
----------------
var.name=some+data
Array
(
[var.name] => some data
)
Actual result:
--------------
var.name=some+data
Array
(
[var_name] => some data
)
--
Edit bug report at http://bugs.php.net/?id=30956&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30956&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=30956&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=30956&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30956&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30956&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30956&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30956&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30956&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30956&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30956&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=30956&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=30956&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30956&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30956&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30956&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30956&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30956&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30956&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30956&r=mysqlcfg