Bug 76559 - Single entry form POST gives incorrect variable content
Single entry form POST gives incorrect variable content
Status: CLOSED DUPLICATE of bug 82967
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-10-23 09:40 EDT by Need Real Name
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:50:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-10-23 09:40:32 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:


echo "
  <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):

How reproducible:

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.
Comment 1 Joe Orton 2002-12-02 06:25:24 EST
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
Comment 2 Need Real Name 2002-12-02 06:37:45 EST
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.
Comment 3 Need Real Name 2002-12-02 06:39:27 EST
Sorry, a mistake.  In my example I gave in the previous posting, the returned
variable should read "barfoo=bar".

Comment 4 Joe Orton 2002-12-02 06:48:52 EST
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.
Comment 5 Need Real Name 2002-12-02 07:04:38 EST



thanks, josh.

Comment 6 Joe Orton 2002-12-02 07:36:55 EST
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
Comment 7 Joe Orton 2002-12-02 07:46:03 EST
I'm still unable to trigger the problem even in the C locale.
Comment 8 Need Real Name 2002-12-02 07:53:36 EST
I changed the system locale as a workaround to another (unrelated) problem.  See:


Comment 9 Joe Orton 2003-07-08 11:39:07 EDT
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 ***
Comment 10 Red Hat Bugzilla 2006-02-21 13:50:01 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.