php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21282 don't work
Submitted: 2002-12-30 01:18 UTC Modified: 2002-12-30 09:40 UTC
From: advnik at mail dot ru Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.0 OS: WinXP Pro SP1
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: advnik at mail dot ru
New email:
PHP Version: OS:

 

 [2002-12-30 01:18 UTC] advnik at mail dot ru
OS: WinXP Pro SP1.
Apache 2.
php 4.3 isap

index.php

    <?php
     session_start();
     session_register("sa");
     echo $sa."<br>";
     $sa=1;
     echo $sa."<br>";
     echo session_id()."<br>";
     echo session_name()."<br>";
     echo session_module_name()."<br>";
     echo session_is_registered("sa")."<br>";
     echo session_save_path()."<br>";  
    ?>
    <a href="http://localhost/index2.php">increment</a>

get 
 
    1
    728be1c2b387346bf08ec42680571589
    PHPSESSID
    files
    1
    C:\Program Files\php-4.3.0-Win32\sessiondata
    increment 

sess_728be1c2b387346bf08ec42680571589 is "sa|i:1;".

index2.php
    <?php
     session_start();
     session_register("sa");
     
     echo $sa."?<br>";
     $sa+=2;
     echo $sa."<br>";
     echo session_id()."<br>";
     echo session_name()."<br>";
     echo session_module_name()."<br>";
     echo session_is_registered("sa")."<br>";
     echo session_save_path()."<br>";  
    ?>
    <a href="http://localhost/index2.php">increment</a>

get
     ?
    2
    728be1c2b387346bf08ec42680571589
    PHPSESSID
    files
    1
    C:\Program Files\php-4.3.0-Win32\sessiondata
    increment 

sess_728be1c2b387346bf08ec42680571589 is "sa|i:1;".

sessiondata access is full.

Why?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-30 09:40 UTC] iliaa@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

When you do: you already have 'sa' inside a session, registering it again is what causes the problem. It is also recomended that you use $_SESSION autoglobal to initialize session rather then session_register();
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC