php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46547 PHP doesn't decode cookies anymore when POST body grows large
Submitted: 2008-11-11 16:19 UTC Modified: 2008-11-20 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: rix0rrr at gmail dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.2.6 OS: Debian Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-11-11 16:19 UTC] rix0rrr at gmail dot com
Description:
------------
When the body of a POST request grows too large, PHP stops decoding 
the passed-in cookies properly. Usually this results in a session 
that is dropped (the user being logged out, etc.)

Reproduce code:
---------------
<?
  session_start();

  $FIELDS = 200;
  ?>

  PHP Version: <b><?= phpversion() ?></b><br>
  Cookies: <b><?  print_r($_COOKIE);l ?></b><br>
  Session ID: <b><?= session_id() ?></b><br>

  <form method="post">
  <input type="submit" value="Send">
  <? for ($i = 0; $i < $FIELDS; $i++): ?>
      <input type="text" name="field[$i]" value="<?= md5(microtime()) ?>">
  <? endfor ?>
  </form>



Expected result:
----------------
Session id does not change between posts, cookies are displayed.





Actual result:
--------------
Depending on the setting of $FIELDS, PHP does or does not drop the 
cookies and therefore the session.

On my setup, setting $FIELDS to 100 works fine and the session is 
maintained, setting $FIELDS to 200 exhibits the behaviour mentioned.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-11 18:44 UTC] jani@php.net
You left quite important things out of your report. Like what SAPI 
you're using for starters. And please, provide reproduce scripts 
without using the short tags. They're not enabled for everyone..
 [2008-11-12 09:17 UTC] rix0rrr at gmail dot com
This was on Apache/2.2.3 as a loaded module.
 [2008-11-12 13:09 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2008-11-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 04:05:54 2022 UTC