ID:               31654
 Updated by:       [EMAIL PROTECTED]
 Reported By:      richkerr at disabilitysoft dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Session related
 Operating System: Win98
 PHP Version:      4.3.10
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:
------------------------------------------------------------------------

[2005-01-22 14:16:13] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2005-01-22 10:56:11] richkerr at disabilitysoft dot com

Description:
------------
Calling session_start() in separate page causes session variables set
elsewhere to disappear despite confirmed identical session name and id
and no referencing of disppearing vars.

Server is Apache 1.3.33 (Unix). Local machine Win98, browser IE6.

session_start() is only sess func used. isset, assignment, and
reference of $_SESSION array is full extent of sess operations.
 
Search params are sess vars, so results page can be refreshed and still
get the same results. Clicking on a login link that opens a separate
window that calls session_start causes search params to disappear.  

Search params never referenced on login page. Login page is just
session_start() and check of 'login' and 'password' related vars.
Removing any reference to $_SESSION with just a sesssion_start() call
doesn't stop prob.  Followup with removing call to session_start()
stops prob. session_id() confirms identical session is in use.

Sess vars used extensively in web app with similar archtecture without
prob anywhere else. Problem is guaranteed with the call to
session_start, identical session confirmed, and removing call to
session_start() stops search params from disappearing.

Wonder if you know what the prob could be?












Reproduce code:
---------------
results.php:

session_start();

/*prepare search vars (most previously set via $_POST - $_SESSION no
prob
if(isset($_SESSION['cmd'])){
        $cmd = $_SESSION['cmd'];
        if(substr($cmd, 0, 2) == 'bw')
                $db = 'w';
        else
                $db = 'a';
}else
        $db='a';
if(isset($_GET['page'])){
        if($_GET['page'] != '')
                $page = $_GET['page'];
        else
                $page = 1;
}else
        $page = 1;

//abort search and redirect to index.php if no sess vars
if($_SESSION[$cmd ."City"] == "" and $_SESSION[$cmd ."State"] == "" and
$_SESSION[$cmd ."Zip"] == "" ){
header("Location:
http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."index.php");      
}
....goes on to call to OutputSearchResults()...



Login page:

session_start();
//check for already logged in
EnsureSessVarSet("usr_login");
$usr_login = $_SESSION["usr_login"];
EnsureSessVarSet("usr_password");
$usr_password = $_SESSION["usr_password"];
EnsureSessVarSet("usr_db");
$usr_db = $_SESSION["usr_db"];
function EnsureSessVarSet($index){
        if(!isset($_SESSION[$index]))
                $_SESSION[$index] = "";

}
//if $usr_login and $usr_password != "" then already logged in







Expected result:
----------------
Calling session_start() should not cause other sess vars to disappear
when session_name and session_id are identical and those sess vars have
not been referenced. 

Actual result:
--------------
Calling session_start() in separate window causes non-referenced sess
vars to disappear despite identical session_id() and no referencing of
the disappeared vars.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31654&edit=1

Reply via email to