w3sl3y2003 Posted February 7, 2007 Share Posted February 7, 2007 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 More sharing options...
trq Posted February 7, 2007 Share Posted February 7, 2007 Your last paragraph is a contradiction, can you refrase it? Link to comment https://forums.phpfreaks.com/topic/37450-browser-specific-session-problems/#findComment-179045 Share on other sites More sharing options...
w3sl3y2003 Posted February 8, 2007 Author Share Posted February 8, 2007 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. Link to comment https://forums.phpfreaks.com/topic/37450-browser-specific-session-problems/#findComment-179730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.