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: <?php echo " <form action=\"foo.php\" method=\"post\"> <input type=\"text\" name=\"bar\"> <input type=\"submit\" value=\"Hit me!\"> </form>"; ?> returns the variable $bar with contents: <value>bar=<value> See the thread here: http://bugs.php.net/bug.php?id=18648 thanks. josh. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: See description. Actual Results: See description. Expected Results: See description. Additional info: 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 "$_POST['bar']"?
I have register globals set to On. Have you checked the bug report in the PHP bugzilla: http://bugs.php.net/bug.php?id=18648 ...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". josh.
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.
See: http://napalm.cse.bris.ac.uk/test.php http://napalm.cse.bris.ac.uk/test.txt thanks, josh.
Ah, that's interesting - thanks for posting that. A diff between the script output on your system and mine reveals: -//--></style><title>phpinfo()</title></head><body>fishfoo=fish +//--></style><title>phpinfo()</title></head><body>fish ...that it works on mine but not yours... and that our servers are using different locales: -<tr valign="baseline" bgcolor="#cccccc"><td bgcolor="#ccccff"><b>_ENV["LANG"]</b></td><td>C?</td></tr> +<tr valign="baseline" bgcolor="#cccccc"><td bgcolor="#ccccff"><b>_ENV["LANG"]</b></td><td>en_US.UTF-8?</td></tr>
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: http://www.ee.ethz.ch/~slist/mrtg/msg21135.html josh.
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.