Re: Bug #10533: empty POST variables when file uploads disabled

From: Date: Mon, 30 Apr 2001 00:17:08 +0000
Subject: Re: Bug #10533: empty POST variables when file uploads disabled
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-53006@lists.php.net to get a copy of this message
On Sat, 28 Apr 2001, Zeev Suraski wrote: >The way PHP works right now is that multipart encoding is rejected if file >uploads are disabled. We should either change the name of the INI >directive to reflect that it really disables multipart POSTs, or ignore the >file entries in a multipart POST. >Thoughts? Ignore file entries. That way you can disable uploading but keep the multipart-forms working. Wouldn't this be 'backwards-compatible' too? (I hate that term :) --Jani > >At 06:08 28/4/2001, nolan@peaceworks.ca wrote: >>From: nolan@peaceworks.ca >>Operating system: Windows 2000 Server >>PHP version: 4.0.4pl1 >>PHP Bug Type: Variables related >>Bug description: empty POST variables when file uploads disabled >> >>I'm not sure if this is a bug or a feature, but I came across it while >>thinking that having GET and POST variables together were causing a >>problem. Turns out it was POST variables not being passed when file >>uploads were disabled and the enctype was multipart. Here's my synopsis: >> >>If I have these two files.... >> >>testform.php: >><form action="testout.php?q=1" method="post"> >><input type="text" name="f"> >><input type="submit"> >></form> >> >>and testout.php: >><? >>echo "q: $q<br>"; >>echo "f: $f<br>"; >>?> >> >>then, say I request testform.php in a browser and type "hello" in the >>field. I get back this when I submit... >> >>q: 1 >>f: hello >> >>looks good so far, but if I then change the form to look like this: >> >><form action="testout.php?q=1" method="post" >>enctype="multipart/form-data"> >> >>then I re-request the page and type "hello" in the field, and submit...I >>get this: >> >>q: 1 >>f: >> >>*oops*...looks like the multipart/form-data encoding type makes the form >>variables go away. Interesting...but changing the POST to a GET seems to >>work. What if I don't want the variables in the query string, though? >> >>I check the php.ini and discover that file uploads are disabled. I enable >>file uploads and voila! it works!!! now I get... >> >>q: 1 >>f: hello >> >>regardless of whether I use POST or GET. Since file uploads were disabled, >>I assumed that file widgets would not be allowed to pass data, but I >>didn't think that having a form with multipart/form-data as the encoding >>type would disable POSTing in general when file uploads were disabled. >> >>So...is it a feature, or is it a bug? >> >> >>-- >>Edit Bug report at: http://bugs.php.net/?id=10533&edit=1 >> >> >> >>-- >>PHP Development Mailing List <http://www.php.net/> >>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net >>For additional commands, e-mail: php-dev-help@lists.php.net >>To contact the list administrators, e-mail: php-list-admin@lists.php.net > >-- >Zeev Suraski <zeev@zend.com> >CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/ax�šÍÇ„´Z >÷“ˆev > > >

« previous php.dev (#53006) next »