Bug #17958 Updated: <input type=file> loses $_POST vars
| From: | ddp at deakin dot edu dot au | Date: | Wed, 10 Jul 2002 05:15:35 +0000 |
| Subject: | Bug #17958 Updated: <input type=file> loses $_POST vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13686@lists.php.net to get a copy of this message | ||
ID: 17958
Updated by: ddp@deakin.edu.au
Reported By: ddp@deakin.edu.au
Status: Open
Bug Type: Apache2 related
Operating System: Linux 2.4.18
PHP Version: 4.2.1
New Comment:
Testing this with the form method changed to GET appears to work. Thus
the issue is further narrowed down to php4 interacting with
apache2.0.39 and _POST .. BTW we downloaded the cvs version of apache2
and php to see if the problem was resolved there but it is the same.
Previous Comments:
------------------------------------------------------------------------
[2002-07-09 22:27:28] ddp@deakin.edu.au
I have just been reading over the php bugs newsgroup and there seems to
be some attempt to connect this bug with #17897. This bug is not
related to having a / or not at the end of the action line (as can be
seen by the example listed below).
This problem is the only one stopping us from moving to apache2. I
would greatly appreciate some feedback on this bug. I am quite willing
to debug/test, etc. as required.
------------------------------------------------------------------------
[2002-06-25 21:51:20] ddp@deakin.edu.au
Sorry, yes the output with the <input type="file"> line in the html
is:
print_r( Array ) :Array
(
[VAR1] => 1
)
Without the above line, VAR1 and VAR2 are displayed.
------------------------------------------------------------------------
[2002-06-25 11:08:15] sniper@php.net
Just to clarify this: That last hidden field is not in $_POST ?
------------------------------------------------------------------------
[2002-06-25 00:28:53] ddp@deakin.edu.au
When I include an <input type=file> in a form and post it (whether or
not I actually upload a file) the $_POST vars are cut short. This is
with Apache-2.0.39 and both php-4.2.1 and with a CVS version (from 25
June 2002).
See the script (tst.php) below:
<html>
<head>
<title>File Upload Test</title>
<meta http-equiv="Content-Type" content="text/html;">
</head>
<body bgcolor="#FFFFFF">
<pre>
<?php
print "print_r( $_POST ) :";
if (isset($_POST)) { print_r($_POST); }
?>
</pre>
<form enctype="multipart/form-data" action="tst.php"
method="post">
<input type="hidden" name="VAR1" value="1">
Send this file: <input type="file" name="userfile[]">
<!-- comment out the line above for VAR2 to be successfully
posted
-->
<input type="hidden" name="VAR2" value="2">
<input type="submit" value="Test">
</form>
</body>
</html>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17958&edit=1