#46547 [Opn->Fbk]: PHP doesn't decode cookies anymore when POST body grows large

From: Date: Tue, 11 Nov 2008 18:44:06 +0000
Subject: #46547 [Opn->Fbk]: PHP doesn't decode cookies anymore when POST body grows large
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130897@lists.php.net to get a copy of this message
ID: 46547 Updated by: jani@php.net Reported By: rix0rrr at gmail dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Debian Linux PHP Version: 5.2.6 New Comment: 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.. Previous Comments: ------------------------------------------------------------------------ [2008-11-11 16:19:34] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46547&edit=1

« previous php.bugs (#130897) next »