#28923 [Opn->Bgs]: session_start() problem after flush()

From: Date: Tue, 29 Jun 2004 15:54:38 +0000
Subject: #28923 [Opn->Bgs]: session_start() problem after flush()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-61495@lists.php.net to get a copy of this message
ID: 28923 Updated by: iliaa@php.net Reported By: joula at sztaki dot hu -Status: Open +Status: Bogus Bug Type: Session related Operating System: Windows XP PHP Version: 4.3.7 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php when you call flush() even if nothing was flushed PHP sets a flag indicating that body of the message was sent and no more headers can be sent. This is why you get an error from session_start() which attempts to send http headers. Previous Comments: ------------------------------------------------------------------------ [2004-06-25 16:34:41] joula at sztaki dot hu Description: ------------ Hello, There is a problem with session_start() when I call it after flush(). Thanks. Reproduce code: --------------- <? flush(); session_start(); echo "here"; ?> Expected result: ---------------- Do not get warning. Actual result: -------------- Warning: session_start(): Cannot send session cookie - headers already sent in ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28923&edit=1

« previous php.bugs (#61495) next »