session lost....
Posted: Mon May 29, 2006 9:31 pm
everything works well when i develope the codes under fedora core 4..using php 5.1.1 apache 2.2.0
but when i migrate to a window 2003 server, php 5.1.2, all the session variables are lost when the browser is redirected from the login verification to the main page...
the codes are as follows
I included this at the top of the main page so that i can use the stored session variables.
This is how i assigned the session variables.
After verifying the user is a valid user, i redirect him using javascript
At the top of the inbox page, i checked if one of the session variables is NULL. If its NULL, i will redirect him to the login page.
In this case, i'm using the session variable to check. But after logging in, the session variables should be set after the user had logged in. But in this case, all the session variables are lost. I had searched many sites for similair problems but none really gave a valid answer.
Thx for the help.
but when i migrate to a window 2003 server, php 5.1.2, all the session variables are lost when the browser is redirected from the login verification to the main page...
the codes are as follows
Code: Select all
session_start();
session_register('session');Code: Select all
$session['id']=session_id();
$session['userid']=$rec['name'];
$session['loginID']=$loginID;
$session['password']=$password;
session_write_close();After verifying the user is a valid user, i redirect him using javascript
Code: Select all
print "<script>self.location='../myinbox/myinbox.php'</script>";In this case, i'm using the session variable to check. But after logging in, the session variables should be set after the user had logged in. But in this case, all the session variables are lost. I had searched many sites for similair problems but none really gave a valid answer.
Thx for the help.