Red Hat Bugzilla – Bug 76559
Single entry form POST gives incorrect variable content
Last modified: 2007-04-18 12:47:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830
Description of problem:
A single-field form results in an incorrect variable being passed. For example:
<form action=\"foo.php\" method=\"post\">
<input type=\"text\" name=\"bar\">
<input type=\"submit\" value=\"Hit me!\">
returns the variable $bar with contents: <value>bar=<value>
See the thread here: http://bugs.php.net/bug.php?id=18648
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: See description.
Expected Results: See description.
You can workaround this by adding a hidden field:
<input type=hidden name=foo>
but it's ugly.
I can't reproduce a problem here with single-field forms. When you say
"variable $bar" you are aware that register globals is off in the default
configuration (/etc/php.ini), so you have to retrieve form variable using
I have register globals set to On.
Have you checked the bug report in the PHP bugzilla:
...so I'm not the only one with RH8.0 experiencing this problem.
Let me clarify the description of the bug: if I create a single field form, the
variable value gets mangled to the following format: <value>foo=<value>. Say I
enter "bar" in a text field, I get "barfoo=foo" returned.
Many thanks, josh.
Sorry, a mistake. In my example I gave in the previous posting, the returned
variable should read "barfoo=bar".
Yes, I've read the upstream bug reports too, but I can't reproduce the problem
here on a vanilla 8.0 system. Maybe it's a random corruption problem.
Ah, that's interesting - thanks for posting that. A diff between the script
output on your system and mine reveals:
...that it works on mine but not yours...
and that our servers are using different locales:
-<tr valign="baseline" bgcolor="#cccccc"><td
+<tr valign="baseline" bgcolor="#cccccc"><td
I'm still unable to trigger the problem even in the C locale.
I changed the system locale as a workaround to another (unrelated) problem. See:
The PHP package works correctly in this configuration in the latest erratum.
Thanks for the report.
*** This bug has been marked as a duplicate of 82967 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.