Jump to content

Browser specific session problems


w3sl3y2003

Recommended Posts

Hi all,

 

Excuse the verbosity - I want whoever reads it to be really clear on what my problem is :-)

 

I have a small application that uses sessions as a means of authenticating users to a secure section. The problem is that it works ideally when using Internet Explorer 6 but doesn't work with Mozilla Firefox. I've narrowed the reason down to the way Firefox handles sessions.

 

My application structure is as follows

http://localhost/scripts

                      |

                      ------enter.php

http://localhost/scripts/secure

                                  |

                                  -----execute.php

 

A user gains access to execute.php by navigating to the enter.php page where a user is prompted with a username and password field. If the user enters the correct details a session is set indicating that the user is logged in. The user is then transferred to the /secure/execute.php page which checks the session variable to see if the user is logged in.

 

If however, a user navigates directly to http://localhost/scripts/secure/execute.php they are supposed to be redirected to http://localhost/scripts/enter.php

 

The problem I have is the following : After I login (using IE), if I close my browser window and open up another browser window and attempt to go directly to http://localhost/scripts/secure/execute.php I am redirected to http://localhost/scripts/enter.php - which is correct. However if I try to go directly to http://localhost/scripts/secure/execute.php I am allowed to access the page because a cookie has been created on my machine.

 

Any help is appreciated!

Link to comment
https://forums.phpfreaks.com/topic/37450-browser-specific-session-problems/
Share on other sites

sorry for that!

 

The problem I have is the following : After I login (using IE), if I close my browser window and open up another browser window and attempt to go directly to http://localhost/scripts/secure/execute.php I am redirected to http://localhost/scripts/enter.php - which is correct. However if I try to go directly to http://localhost/scripts/secure/execute.php (using firefox) I am allowed to access the page because a cookie has been created on my machine.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.