ID:               28788
 Comment by:       imprestavel at gameguru dot com dot br
 Reported By:      lsjoberg at aland dot net
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: Redhat Enterprise Linux
 PHP Version:      5.0.0RC3
 New Comment:

Yeah... this is odd.
I can't reproduce it here... Tryed running php as module and cgi.
Let's wait for a word from php team...


Previous Comments:
------------------------------------------------------------------------

[2004-06-21 08:46:41] lsjoberg at aland dot net

I created a simple test page (http://www.vallnet.se/test.htm) which
posts forms to both a PHP script which executes print_r($_POST); and a
CGI script which prints its stdin.

When run on a webserver with PHP as a CGI everything executes as
expected. The CGI-script prints 'foo=5' and 'foo=5&bar=5' and the
PHP-script '[foo] => 5' and '[foo] => 5'/'[bar] => 5'.

The CGI output from the Apache server is the same, but for the form
with a single element the PHP output is
Array
(
    [foo] => 5foo=5
)

The PHP output for the 2-field form is however correct, hence it seems
to be some part of the apache/php interface that is failing...

The same browser(s) and exactly the same scripts were used during
testing.

------------------------------------------------------------------------

[2004-06-19 11:56:19] lsjoberg at aland dot net

The original code was fully W3C compliant, the testcase below was
stripped down before submitted.

Browsers used was Mozilla and Opera under FreeBSD and Internet Explorer
in some Windows flavour.

It feels like a browser bug but since it occured when upgrading from
PHP4 to PHP5 without code changes it seems suspicious.

I will do some more testing during next week to see if I can isolate
the problem further.

------------------------------------------------------------------------

[2004-06-18 20:33:52] imprestavel at gameguru dot com dot br

It looks more like a browser issue.
Have you tryed writing conformant html?

I tested with Mozilla/rv1.6 and IE/6.0 on Apache/2.0.49, PHP/5.0.0RC3
(register_globals=On and Off), under Windows2000 and didn't have that
problem (with the same no-" html).

What browser are you using?

------------------------------------------------------------------------

[2004-06-15 11:31:36] lsjoberg at aland dot net

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 this bug report at http://bugs.php.net/?id=28788&edit=1

Reply via email to