From: lsjoberg at aland dot net Operating system: Redhat Enterprise Linux PHP version: 5.0.0RC3 PHP Bug Type: Apache2 related Bug description: Bogus form data when forms contains a single input field
Description: ------------ When a HTML form contains a single input field (this could be plain INPUT, HIDDEN, SELECT or just about any time) with an associated value the value is not passed correctly to the receiving PHP script. This only happends when the form contains exactly one field and when PHP is run as an Apache2 module. (Could not reproduce with PHP running as CGI under caudium). Reproduce code: --------------- test.htm: <html><body> <form method="POST" action="test.php"> <input name=id value=5> <input type=submit> </form></body></html> test.php: <? echo $id; ?> Expected result: ---------------- The expected result is that the php script should print a 5 and nothing else. (We are using register_globals=On). Actual result: -------------- The output of the php-script is '5id=5' instead of '5'. If a <input type=hidden name=foo> is added to the html form the correct output of 5 is displayed. -- Edit bug report at http://bugs.php.net/?id=28788&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28788&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28788&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28788&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28788&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28788&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28788&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28788&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28788&r=support Expected behavior: http://bugs.php.net/fix.php?id=28788&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28788&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28788&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28788&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28788&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28788&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28788&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28788&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28788&r=float