kellan4459
IS-IT--Management
I haven't found a definite answer to this on the forum but I have a page that verifies that the login is correct and if so it sets a session variable
if ( $success ) {
/* Username is set as a session variable with slashes */
session_start();
//session_register("username");
$_SESSION["username"] = $username;
header("Cache-control: private"); //IE 6 Fix
header("Location: ".URL_ROOT."applicant/index.php");
}
Once this occurs the applicant/index.php file does the following
<?php
session_start();
print_r($_SESSION);
echo session_id();
include("../defines.php");
include("verify_login.php");
include(COMMON."/dblogin.php");
include('handlers/indexhandle.php');
include(COMMON."/header.php");
?>
<table>
<tr>
<td valign="top" width="165">
<?php
include('indexLeftNav.php');
?>
</td>
<td>
<?php
include('in/indexIn.php');
?>
</td>
</tr>
</table>
<?php
include(COMMON."/footer.php");
?>
For some reason between the initial session_start() call and the call in applicant/index.php two sessions get created. The verify_login that is included in index checks to make sure the session variable is set and it checks the second session which is null so I then get my session timed out page and when I click to go back and login I can login fine and the session works throughout the site. I am trying to determine where this extra session is coming in but I haven't found anything on the forum that really says what is normally happening in this situation or anything that gives a strong debugging guide. It is working on a test server with w2k but trying to install on xp pro for demo purposes where internet isn't available.
Installation information
Apache 2.0.54
PHP 5.04
Windows XP
Thanks for the help
if ( $success ) {
/* Username is set as a session variable with slashes */
session_start();
//session_register("username");
$_SESSION["username"] = $username;
header("Cache-control: private"); //IE 6 Fix
header("Location: ".URL_ROOT."applicant/index.php");
}
Once this occurs the applicant/index.php file does the following
<?php
session_start();
print_r($_SESSION);
echo session_id();
include("../defines.php");
include("verify_login.php");
include(COMMON."/dblogin.php");
include('handlers/indexhandle.php');
include(COMMON."/header.php");
?>
<table>
<tr>
<td valign="top" width="165">
<?php
include('indexLeftNav.php');
?>
</td>
<td>
<?php
include('in/indexIn.php');
?>
</td>
</tr>
</table>
<?php
include(COMMON."/footer.php");
?>
For some reason between the initial session_start() call and the call in applicant/index.php two sessions get created. The verify_login that is included in index checks to make sure the session variable is set and it checks the second session which is null so I then get my session timed out page and when I click to go back and login I can login fine and the session works throughout the site. I am trying to determine where this extra session is coming in but I haven't found anything on the forum that really says what is normally happening in this situation or anything that gives a strong debugging guide. It is working on a test server with w2k but trying to install on xp pro for demo purposes where internet isn't available.
Installation information
Apache 2.0.54
PHP 5.04
Windows XP
Thanks for the help