From: sarciszewski at knights dot ucf dot edu Operating system: Debian PHP version: 5.4.9 Package: Apache2 related Bug Type: Bug Bug description:POST value duplicated when passed to PHP
Description: ------------ Originally I thought this was an Apache bug since php://input held duplicate POST data. https://issues.apache.org/bugzilla/show_bug.cgi?id=54218 - However, Perl correctly reads single values. admin@summit:$uname -a Linux summit 2.6.26-2-686-bigmem #1 SMP Sun Mar 4 23:05:22 UTC 2012 i686 GNU/Linux admin@summit:$/usr/sbin/apache2 -v Server version: Apache/2.2.16 (Debian) Server built: Sep 9 2012 21:17:33 admin@summit:$ /usr/bin/php5 -v PHP 5.4.9-1~dotdeb.0 (cli) (built: Nov 26 2012 04:24:47) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies Test script: --------------- <? if(!empty($_POST)) { header("Content-Type: text/plain"); echo file_get_contents('php://input'); echo "\n=========================================================\n"; var_dump($_POST); exit; } ?> This duplicates: <form method="post" target="_blank"> <input type="text" name="menu" value="Blah" /> <input type="submit" /> </form> <p>This doesn't:</p> <form method="post" target="_blank"> <input type="text" name="menu" value="Blah" /> <input type="text" name="second" value="Second value" /> <input type="submit" /> </form> Expected result: ---------------- Output (first button): menu=Blah ========================================================= array(1) { ["menu"]=> string(4) "Blah" } Output (second button): menu=Blah&second=Second+value ========================================================= array(2) { ["menu"]=> string(4) "Blah" ["second"]=> string(12) "Second value" } Actual result: -------------- Output (first button): menu=Blahmenu=Blah ========================================================= array(1) { ["menu"]=> string(13) "Blahmenu=Blah" } Output (second button): menu=Blah&second=Second+valuemenu=Blah&second=Second+value ========================================================= array(2) { ["menu"]=> string(4) "Blah" ["second"]=> string(12) "Second value" } -- Edit bug report at https://bugs.php.net/bug.php?id=63637&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63637&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63637&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63637&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63637&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63637&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63637&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63637&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63637&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63637&r=support Expected behavior: https://bugs.php.net/fix.php?id=63637&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63637&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63637&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63637&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63637&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63637&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63637&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63637&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63637&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63637&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63637&r=mysqlcfg