#25534 [Opn->Bgs]: "A session had already been started"

From: Date: Mon, 15 Sep 2003 06:40:53 +0000
Subject: #25534 [Opn->Bgs]: "A session had already been started"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47577@lists.php.net to get a copy of this message
ID: 25534 Updated by: phildriscoll@php.net Reported By: yipchiu8 at netvigator dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: windows xp sp1 PHP Version: 4.3.3 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 PHP 4.3.3 fixes a bug in ealier versions of php whereby a warning was not issued when session_start was called more than once. You are now seeing the warning message because you code has two or more calls to session_start. You need to either remove the duplicate session_start calls or, if this is not possible, wrap the calls to session_start with some code which first checks if the session has already started. Maybe something like if(!session_id())session_start(); Previous Comments: ------------------------------------------------------------------------ [2003-09-14 22:44:50] yipchiu8 at netvigator dot com Description: ------------ I used PHP 4.3.2. to create a web site. Anything is okay. After installing PHP 4.3.3, my site can't be accessed. It always display as follows : ---------------------------------------------------- Notice: A session had already been started - ignoring session_start() in c:\inetpub\wwwroot\assessment\student.php on line 32 Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\assessment\student.php:32) in c:\inetpub\wwwroot\assessment\student.php on line 43 ----------------------------------------------------- After downgrading from 4.3.3. to 4.3.2, my site back to normal again. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25534&edit=1

« previous php.bugs (#47577) next »