#44320 [Bgs]: Sessions aren't restarting or renewing
| From: | tidus_david at hotmail dot com | Date: | Thu, 17 Jul 2008 20:47:55 +0000 |
| Subject: | #44320 [Bgs]: Sessions aren't restarting or renewing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-126911@lists.php.net to get a copy of this message | ||
ID: 44320
User updated by: tidus_david at hotmail dot com
Reported By: tidus_david at hotmail dot com
Status: Bogus
Bug Type: Session related
Operating System: Windows Vista
PHP Version: 5.2.5
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-03-05 09:20:01] jani@php.net
I'd check that config.php file for whitespace before <?php tag..:)
------------------------------------------------------------------------
[2008-03-05 09:19:30] 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-04 05:37:11] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44320&edit=1