dennismonsewicz Posted August 28, 2007 Share Posted August 28, 2007 Last night I created a login and logout script for a website. Here is a short version of the long story: When I first developed the site we had tons of permission problems. It was asking for windows authentication when trying to view the site. Well for a temporary fix we set up a temporary user. Well I finally got around to creating the login/logout script and in the event of having both the windows authentication and the PHP login, everything worked fine. Well I told the IT guy that we need to get rid of the Windows authentication. So he created another user outside of the anonymous web user (IUSR) windows likes to use for anonymous web access through IIS. Well that screwed up everything. PHPmyadmin had a hissy fit with PHP files erroring out with the error of no input file specified and the login page for the website kept refreshing itself instead of doing the set action specified by the HTML. Well now I finally got it to stop asking for windows authentication. But no session is started now. I can physically logout by going to the logout page and physically log back in, but this only happens when I go to the actual URL of the login page. Below is the code being used to start the session: session_start(); if(!session_is_registered(username)){ header("location:login/index.php"); } The session does not happen and totally ignores itself and loads the site anyways. Any help with this will be greatly appreciated. -Dennis Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 28, 2007 Share Posted August 28, 2007 The session does not happen and totally ignores itself and loads the site anyways. Any help with this will be greatly appreciated. -Dennis While i know nothing of your troubles with windows authentication etc, i do know that your summing up is a bit vague! What do you actually mean? Can you never stay logged in? Or does it allow you to view pages which require a login without having previously logged in? If its the first, then there are potentially lots of causes. It could be your PHP setup. Also, if you are creating your session variables using the $_SESSION or $HTTP_SESSION_VARS arrays, then you should not use session_is_registered (www.php.net/session_is_registered) Can we have a bit more detail? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.