|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22666 POST only passing a limited number of form variables
Submitted: 2003-03-12 15:55 UTC Modified: 2003-03-19 16:49 UTC
Avg. Score:3.6 ± 1.1
Reproduced:10 of 10 (100.0%)
Same Version:1 (10.0%)
Same OS:4 (40.0%)
From: lbravo at nc dot rr dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.3.0 OS: WIndows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lbravo at nc dot rr dot com
New email:
PHP Version: OS:


 [2003-03-12 15:55 UTC] lbravo at nc dot rr dot com
I encountered a problem when passing about 20+ variables in the context of form variables.  The same problem occurs if using arrays in the context of form variables.  Only a certain number are passed, generally those that appear first before the submit are passed, the exact number seems to vary some what.  I have created simple php scripts and tested with the same results.  I am not sure if the actual naming makes a difference or not, the results seem to vary depending on how you try to set up the test. I am very puzzled, with this behavior.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-12 17:09 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

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.

 [2003-03-19 16:49 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2007-11-03 19:22 UTC] xeenych at gmail dot com
I also encountered this bug
Os: Windows XP SP2
PHP: 5.2.4-win32

The problem is the following.

I create a stream context with some (>2) form variables and issue a POST request to a redirecting page on a remote webserver using fopen() or file_get_contents()

Using packet sniffer i discovered, that remote webserver responds HTTP 1.1 302 found and sends location = someotherpage.php

Then, file_get_contents() follows redirect and sends another POST request for the page someotherpage.php, but this request appears to be trashed with some form variables from the very first request.

In best case, when there are 2 or may be 3 form variables, remote server sends error 411 - "length required"
In worst, it sends Bad request.
 [2008-07-17 14:04 UTC] nospam at me dot com

i have the same problem...
i used a local proxy to sniff the headers:

POST /index.php HTTP/1.0
Content-Length: 64
Content-type: application/x-www-form-urlencoded
Connection: keep-alive

HTTP/1.1 302 Found
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: index.php?id=15
Content-type: text/html
Transfer-Encoding: chunked
Date: Thu, 17 Jul 2008 13:50:41 GMT
Server: lighttpd/1.5.0

POST /index.php HTTP/1.0
Connection: keep-alive

HTTP/1.1 411 Length Required
Content-Type: text/html
Content-Length: 357
Connection: close
Date: Thu, 17 Jul 2008 13:50:45 GMT
Server: lighttpd/1.5.0

In my humble opinion the 2nd request should be a GET request...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 10:01:27 2024 UTC