php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44320 Sessions aren't restarting or renewing
Submitted: 2008-03-04 05:37 UTC Modified: 2008-07-17 20:47 UTC
From: tidus_david at hotmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.5 OS: Windows Vista
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tidus_david at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-03-04 05:37 UTC] tidus_david at hotmail dot com
Description:
------------
In the new version of php, the sessions seems to be bad because they say that headers are already sent... so it is not updating the cookie thing, better explanation with the code, by the way, my page is http://dfun.servegame.com/minimanager so you can see what happens

Reproduce code:
---------------
	//set user variables
	session_regenerate_id();
	$user_lvl = $_SESSION['user_lvl'];
	$user_name = $_SESSION['uname'];
	$user_id = $_SESSION['user_id'];
	$realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) : $_SESSION['realm_id'];


Expected result:
----------------
It should load the menus correctly and show a tooltip when you put the mouse over the any menu, but it loads bad

Actual result:
--------------
session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in C:\server\htdocs\Minimanager\header.php on line 73


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 09:19 UTC] jani@php.net
Nothing has changed in this regard, you just have done a mistake in your script. NOTHING can be output before calling session_start().
 [2008-03-05 09:20 UTC] jani@php.net
I'd check that config.php file for whitespace before <?php tag..:)
 [2008-07-17 20:47 UTC] tidus_david at hotmail dot com
The problem was solved, it was with the encoding that Microsoft Web Dessigner does over the php files, that was the cause of this bug, I rebackup all my webpages and used Notepad for editing since it doesn't alter the encryption used.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 19:01:36 2025 UTC