php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20643 long POST fields get truncated
Submitted: 2002-11-26 04:54 UTC Modified: 2002-12-29 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: douwe at frontier dot nl Assigned:
Status: No Feedback Package: Apache related
PHP Version: 4CVS-2002-11-26 (dev) OS: Windows NT
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: douwe at frontier dot nl
New email:
PHP Version: OS:

 

 [2002-11-26 04:54 UTC] douwe at frontier dot nl
Long (>~3k) POSTED fields get truncated

Following test produces correct results (twice the same length) on Linux + Apache + PHP, Windows NT + IIS + PHP,
but NOT on Windows NT + Apache + PHP.
In last case, back in PHP the length appears to be 4374
bytes. Making the fieldname longer or shorter affects
this length, adding more fields doesn't.

This behaviour looks very much like reported bug #18961,
which is closed. Today, I downloaded, the what I think is,  the latest version (4.4.0-dev). But problem still exists.

The apache server I use is Apache: 1.3.19.0.0a delivered with Oracle Application Server 1.0.2.2.2a .

My test file:

<?php
  if(isset($_POST['data1']))
  {
	echo "<html><body>Data length: " . strlen($_POST['data1']) . "</body></html>";
        return;
  }
?>
<html>
<body>
<?php echo "<form name='form' action='$PHP_SELF' method='post'>"; ?>

<input name="data1" type="hidden" id="data1"/>
</form>
<script language="JavaScript">
   var data = document.getElementById("data1");

   data.value = "<?php echo str_pad('', 6000, 'x'); ?>";
   alert("Datalength: " + data.value.length);
   form.submit();
</script>
</body>
</html>

Thanks,

   - Douwe Koops

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-26 20:10 UTC] sniper@php.net
Are you sure you have replaced ALL the old files with the new ones found in the package? Most important one being php4ts.dll (and also make sure you don't have many copies of it!)

 [2002-11-27 03:38 UTC] douwe at frontier dot nl
I double checked it, found the file you mentioned twice, but both are the same, new updated files.
So problem persists.
 [2002-12-12 19:50 UTC] johan at rsca dot be
Indeed,

we changed our server into RedHat 8.0 (Apache 2.0, PHP 4.2.2).

PHP Code that worked fine on the old server doesn't work on the new server. Post-method forms let some variables (small) pass without any problem, but bigger vars got truncated and concatenated with the original value.
 [2002-12-13 02:32 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Dec 03 11:01:23 2020 UTC