Losing session vars in windows xp professional
Moderator: General Moderators
-
clem_c_rock
- Forum Commoner
- Posts: 46
- Joined: Mon Jun 07, 2004 9:18 am
Losing session vars in windows xp professional
Good Morning,
I've come across a curious problem concerning windows xp. I have a database program that uses a frameset as the html structure. I'm using a session variable to pass a user id across the frameset. I've tested this script in about every browser imaginable from Safari, Opera, Netscape, Firefox, IE, Mozzilla on both mac os 10, and many flavors of windows. In short - It works flawlessly on all.
My friend who uses the program has Windows XP professional and, on most days, cannot use the program because the browser loses the session variables when you enter the page. After the session vars are set, and you test the existance of session vars apon entering the program w/ the print_r( $_SESSION ) method, the session array is empty.
The strangest part is I have windows XP pro on my work machine and It works fine on this machine.
I'm completely stumped.
Thanks Clem C
I've come across a curious problem concerning windows xp. I have a database program that uses a frameset as the html structure. I'm using a session variable to pass a user id across the frameset. I've tested this script in about every browser imaginable from Safari, Opera, Netscape, Firefox, IE, Mozzilla on both mac os 10, and many flavors of windows. In short - It works flawlessly on all.
My friend who uses the program has Windows XP professional and, on most days, cannot use the program because the browser loses the session variables when you enter the page. After the session vars are set, and you test the existance of session vars apon entering the program w/ the print_r( $_SESSION ) method, the session array is empty.
The strangest part is I have windows XP pro on my work machine and It works fine on this machine.
I'm completely stumped.
Thanks Clem C
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
-
clem_c_rock
- Forum Commoner
- Posts: 46
- Joined: Mon Jun 07, 2004 9:18 am
At this point, I cannot tell what it's doing. Having the browser lose the session seems to defy the very laws of php. I asked my friend to download Mozzilla and the same thing happened in the Mozilla browser. To give you more details in how the program works: The program is a contact admin for a group of teachers who login to the program and create these session vars: user_id, user_level.
at an administrators level, the administrator can view all teachers and their subsequent students. From a dropdown menu at the top frameset, you can choose which teacher you want to view students from. The choice will update the session variable of teacher_id which can be read from all the frames. At this point all session variables disappear and you are automatically logged out of the program. Now this doesn't happen all the time. There are some lucky days where it will work perfectly. My only thought ( given that session vars are created on the server it doesn't really make sense ) is maybe my friend has a specific XP pro update that is causing the problem.
I am completely stumped.
Thanks for your time,
Clem C
at an administrators level, the administrator can view all teachers and their subsequent students. From a dropdown menu at the top frameset, you can choose which teacher you want to view students from. The choice will update the session variable of teacher_id which can be read from all the frames. At this point all session variables disappear and you are automatically logged out of the program. Now this doesn't happen all the time. There are some lucky days where it will work perfectly. My only thought ( given that session vars are created on the server it doesn't really make sense ) is maybe my friend has a specific XP pro update that is causing the problem.
I am completely stumped.
Thanks for your time,
Clem C
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
I was really trying to ask if this was an application he ran on his own PC, or he's just having problems when accessing a web site you'd built? But I guess it's the later.
All the browser would have to do is loose the cookie that holds the session and PHP would become somewhat confused. There are so many things that could cause this its almost not funny.Having the browser lose the session seems to defy the very laws of php
-
clem_c_rock
- Forum Commoner
- Posts: 46
- Joined: Mon Jun 07, 2004 9:18 am
Thanks again for getting back to me on this. Yeah this application is a web site that he is accessing from his home computer.
Yeah actually now that you mention it that cookie makes a great deal of sense. My suspician was that in light of microsoft's efforts to combat their system's vulnerabilities my friend may have different XP patchs on his home computer than the XP pro I have at work. I never had the need to use cookies and PHP much. Any quick suggestions to diagnose the existance of the cookies?
Yeah actually now that you mention it that cookie makes a great deal of sense. My suspician was that in light of microsoft's efforts to combat their system's vulnerabilities my friend may have different XP patchs on his home computer than the XP pro I have at work. I never had the need to use cookies and PHP much. Any quick suggestions to diagnose the existance of the cookies?
Just to rule out any other application specific things you could have him test a simple session page such as:
If the counter doesn't increment when he reloads the page then you'll know that it is specifically sessions/cookies that are causing his problem and not 'something else' in your site.
Code: Select all
<?php
session_start();
if(empty($_SESSION['count'])){
$_SESSION['count'] = 1;
} else {
$_SESSION['count']++;
}
echo $_SESSION['count'];
?>-
clem_c_rock
- Forum Commoner
- Posts: 46
- Joined: Mon Jun 07, 2004 9:18 am