#22427 [Com]: Missing Form Post Data

From: Date: Tue, 29 Aug 2006 17:57:54 +0000
Subject: #22427 [Com]: Missing Form Post Data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101499@lists.php.net to get a copy of this message
ID: 22427 Comment by: egil at egil dot net Reported By: jroland at uow dot edu dot au Status: No Feedback Bug Type: *General Issues Operating System: Windows XP / 2000 PHP Version: 4.2.3 New Comment: I am also getting the exact same problem as "rossi at nelis dot fr" and "gregory dot boyer at limbas dot com". I am not able to reproduce this problem in other browsers than IE6 posting using multipart/form-data as enctype. Previous Comments: ------------------------------------------------------------------------ [2006-08-11 15:43:05] gregory dot boyer at limbas dot com we experience the same trouble as "rossi at nelis dot fr" A form is send with POST method and with enctype multipart/form-data, in the target page the first field is missing. It is only occuring in IE6.0, and only with the enctype ------------------------------------------------------------------------ [2006-06-07 13:32:25] rossi at nelis dot fr I confirm to you that i reproduce this problem with PHP5. The first field (TextArea) is missing when i read $_POST with var_dump($_POST). This bug exists only when i'm using Internet Explorer (6.0 for my version), not with Firefox 1.5. I'm searching for a solution. May be i have to create 2 dummy hidden fields :(:( Please send me an email if you find the solution. ------------------------------------------------------------------------ [2006-05-18 09:05:39] contact at ligh dot de From my point of view, there seems to be a dependance between the appearance of this issue, and the webbrowser being used. For example, I never had such an effect using Opera 8.54, but reliably could reproduce a missing of some first (and always 1 or 2 first) submitted fields (text, textarea, or files) when using Microsoft Internet Explorer 6.0 (XP SP2). I now started to circumvent this problem by adding two dummy hidden input fields which are expendable. Still, this issue needs further investigations, by adding different browsers into account. ------------------------------------------------------------------------ [2004-08-02 13:51:23] admin at ensifex dot nl After updating from 4.3.7 to 4.3.8 i'm loosing POST data. If i create a form with normal text fields and not to much input data there doesn't seem to be a problem. If i use <textarea> with a text larger 985 characters the post data is not send. Used this script to test: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <form action="index.php" method="post"> <textarea name="text"></textarea> <input type="submit" </form> <? print_r($_POST); ?> </body> </html> if i add 'enctype="multipart/form-data"' to the form. All post data is send. php version : 4.3.8 os: OpenBSD 3.5-current apache: 1.3.29 ------------------------------------------------------------------------ [2004-07-30 22:11:28] gary at garyslittlecompany dot com I too am experiencing what has been described in the this submission. I think I have isolated it to php on windows. I summarize it thus because I have an xp, w2k3 and wme servers that experience the same problem. Yes I have used the latest version as of today 4.3.9 build date 7/30/04. I have scripts that have alot of post data, a table full of input objects, the table can be quite large. If I exceed a certain amount (I know it is not an arbitrary size, but I don't know what the size is, but I can duplicate it). Below are my scripts. <?php print '<html><head></head><body><form name = "pageform" action = "post.php" method = "post"><table>'; for ($l = 0; $l < 100; ++$l) { print "<tr><td>First Name</td><td><input type = \"text\", name = \"firstname[$l]\" /></td>\r\n"; print "<td>Last Name</td><td><input type = \"text\", name = \"lastname[$l]\" /></td>\r\n"; print "<td>City</td><td><input type = \"text\", name = \"city[$l]\" /></td>\r\n"; print "<td>State</td><td><input type = \"text\", name = \"state[$l]\" /></td></tr>\r\n"; } print '</table><input type = "submit" value = "submit"/></form></body></html>'; ?> This simply provides my form with a lot of input elements in my html. When submitted it will call the following script <?php print getenv('CONTENT_LENGTH'); print "$HTTP_RAW_POST_DATA<br>"; print_r($_POST); ?> Here is the output 6559 Array ( ) Now if I change my script (action = "cgi-bin\post.ext") to call the following c compiled script... #include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *endptr; int i; double contentlength; char buff[10000]; char a,b; const char *len1 = getenv("CONTENT_LENGTH"); contentlength=strtol(len1, &endptr, 10); fread(buff, contentlength, 1, stdin); printf("Content-type: text/html\n\n%s",buff); } to do the same thing essentially I will get the following 5B95%5D=&lastname%5B95%5D=&city%5B95%5D=&state%5B95%5D=&firstname%5B96%5D=&lastname%5B96%5D=&city%5B96%5D=&state%5B96%5D=&firstname%5B97%5D=&lastname%5B97%5D=&city%5B97%5D=&state%5B97%5D=&firstname%5B98%5D=&lastname%5B98%5D=&city%5B98%5D=&state%5B98%5D=&firstname%5B99%5D=&lastname%5B99%5D=&city%5B99%5D=&state%5B99%5D= This is just a portion of the data that I get, it happens to be the last of the output do demonstrate that I do get the last of the input elements, notice city%5b99%5d, this is the 99th city element, the loop goes from 0-99. Now if you reduce the loop to be 0-5 for example (for ($l = 0; $l < 5; ++$l)) I get the following output when I use the first script (action = "post.php"). 309firstname%5B0%5D=&lastname%5B0%5D=&city%5B0%5D=&state%5B0%5D=&firstname%5B1%5D=&lastname%5B1%5D=&city%5B1%5D=&state%5B1%5D=&firstname%5B2%5D=&lastname%5B2%5D=&city%5B2%5D=&state%5B2%5D=&firstname%5B3%5D=&lastname%5B3%5D=&city%5B3%5D=&state%5B3%5D=&firstname%5B4%5D=&lastname%5B4%5D=&city%5B4%5D=&state%5B4%5D= Array ( [firstname] => Array ( [0] => [1] => [2] => [3] => [4] => ) [lastname] => Array ( [0] => [1] => [2] => [3] => [4] => ) [city] => Array ( [0] => [1] => [2] => [3] => [4] => ) [state] => Array ( [0] => [1] => [2] => [3] => [4] => ) ) The first part is the raw post data, the last is the $_POST variable. I did the c compiled script, simply to rule out my webserver (apache 1.3.27). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22427 -- Edit this bug report at http://bugs.php.net/?id=22427&edit=1

« previous php.bugs (#101499) next »