Some viewers have to login twice

Started by CapnKirkman, March 17, 2009, 02:49:19 AM


I've got Advanced Password Protection script set up on a site and it works from Mac Safari 3.2.1, and in some cases from various Windows systems using IE, but sometimes on IE you need to log in twice to obtain access to the protected page. I've modified the login page to be index.php, and modified the header, footer and login php files. Let me know if I should paste them here, or if someone knows a common reason why this would require double logins to work.

I've got the automatic logout set on all links to the home page.

Anyone know why this happens?


What should I include in this question to get some response to it? I don't know if this is a very simple solution, or if I'm way off base. I've adapted the login.php to become index.php, and also modified the includes, thus having the login on the home page.

To restate the problems, I have (2) issues I need to resolve:

1) Most viewers need to login twice to get into the protected pages.

2) After successful login, viewers returning to the login page get a blank screen.

In an attempt at resolving issue #2 I added ?logout=1 at the end of all links to the home page, but that didn't seem to resolve the issue.

Let me know if posting the entire php scripts would be helpful, or what. I've put way too many hours into trying to track this down, and it's eating up too much energy. Help!



i cant help with your first issue because im having the same trouble.

as for the second, go into your password_protect.php page, close to the bottom of the page you'll see this:

    // set cookie if password was validated
    setcookie("verify", md5($login.'%'.$pass), $timeout, '/');

DELETE THAT....if you want the logger to be automatically logged out once he or she navigates away from the page!

Reminder: Make sure you close the page and reopen it to refresh cookies! It should work!

Does this help?