Bug #17897 Updated: POST form variables are empty
| From: | philip@php.net | Date: | Tue, 09 Jul 2002 02:32:31 +0000 |
| Subject: | Bug #17897 Updated: POST form variables are empty | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13556@lists.php.net to get a copy of this message | ||
ID: 17897
Updated by: philip@php.net
Reported By: hofmann@isl.org
-Status: Bogus
+Status: Open
-Bug Type: Apache2 related
+Bug Type: Apache related
Operating System: Linux
PHP Version: 4.2.1
New Comment:
Confirmed designer_7@yahoo.com example, of action="foo/" vs
action="foo", and lost POST values for the latter. With Apache1 and
GET working both ways. I'm not sure about the apache2/post bug.
Is this a php-dev, phpdoc, or apache bug?
Previous Comments:
------------------------------------------------------------------------
[2002-07-08 19:51:42] designer_7@yahoo.com
I believe I can reproduce this problem. However, if I am correct, I
don't know if this is "intended" to be or if it should be considered a
bug with PHP4 or Apache.
suppose you have a file http://server/somedir/index.php and you've
configured apache to use index.php for the index page.
if your form looks like:
<form action="http://server/somedir/"
method="post">
it DOES WORK.
However if you have a form like:
<form action="http://server/somedir"
method="post">
Even though Apache knows to pull up the /server/somedir/index.php page,
the POST variables don't make it to the page and $_POST is completely
empty.
If using GET, both forms above work fine, i.e.,
http://server/somedir/?key1=val1&key2=val2
and
http://server/somedir?key1=val1&key2=val2
behave identically.
Would this be considered an Apache problem then? Or does it have
something to do with PHP4 interaction with Apache?
I don't know where this should be fixed... but I struggled with this
for a several days and this is my finding. Hope it's of some value...
------------------------------------------------------------------------
[2002-06-21 08:57:44] hofmann@isl.org
This bug is well known and has been reported earlier!
But as it seems it has been removed from the databse, maybe it was not
possible to make it Apache 2 related!
The information reported is enough - I am sure you can do a small test
yourself:
<form method="post" action="test.php">
<input type="text" name="test" value="123" />
<input type="submit" name="submit">
</form>
test.php
<?php
echo ":" . $_POST["test"] . ":";
?>
there is no result echoed!
Just fix it - because I don't want to report this a third time - others
have reported this also!
------------------------------------------------------------------------
[2002-06-21 08:44:52] cynic@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-06-21 08:40:57] hofmann@isl.org
The POST[] and REQUEST[] arrays are missing all fields from the
HTML Post form - Tested with Apache 2.0.39
GET works fine!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17897&edit=1