php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25534 "A session had already been started"
Submitted: 2003-09-14 22:44 UTC Modified: 2003-09-15 02:40 UTC
From: yipchiu8 at netvigator dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.3 OS: windows xp sp1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yipchiu8 at netvigator dot com
New email:
PHP Version: OS:

 

 [2003-09-14 22:44 UTC] 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.  


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-15 02:40 UTC] phildriscoll@php.net
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(); 
 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC