Zubrag.com
July 19, 2018, 07:11:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 2 [3] 4
  Print  
Author Topic: Adding Logout link  (Read 116295 times)
David
Newbie
*
Posts: 29


« Reply #28 on: December 08, 2008, 02:36:24 PM »

Hey dgow

I can't login using the zubrag and root. Can you check you havent made a spelling error or used capitals somewhere?

Thanks

David

Logged
soccercap5
Newbie
*
Posts: 1


« Reply #29 on: February 23, 2009, 09:53:56 AM »

I am having difficulties with the logout link.  If I delete all my cookies and go to my welcome page, when I hit my ENTER button, I proceed to the Password_Protect page which displays the login and password form as it should.  I can then login and go to my password protected page.  On this page, I have put the logout link and when I click on it, I have it redirect to my welcome page and it sets logout=1 again as it should.  But then, when I hit ENTER again on my welcome page, the login and password form are skipped and i go directly to my password protected page again. 

I would like this to function as follows:  when you hit logout, it brings you back to the welcome page, but now if you have hit logout previously, you will have to re-enter information in the login and password form.  Also, firefox does not clear my cookies upon exiting, and so when I close the browser, I also skip the login/password form when I hit ENTER.  Any help?  Let me know if you need more info.
Logged
arjun
Newbie
*
Posts: 1


« Reply #30 on: October 24, 2009, 11:38:13 PM »

I newly started using your password protecter (simple version) and the login works fine but when i click the logout link it redirects the user to the  proper page but if i click back it just goes back to the protected page and skips the login page.
i used the code you gave for clearing the cache but it still doesnt work it only logs out if i close the browser.

you can try the page at http://www.techlibrary.co.cc/funbox.php use this id to login
id= admin
pass=admin1234login

please help
Logged
ruks12
Newbie
*
Posts: 3


« Reply #31 on: November 05, 2009, 10:08:58 AM »

Im trying to use the logout link but it doesn't work - http://www.callnorthwest.org.uk/news/research-papers.php

What path do i have to put for the logout -

I have done the re-direct in the php code - define('LOGOUT_URL', 'http://www.callnorthwest.org.uk');

i change example to my website but still it don't work

 <a href="http://www.callnorthwest.org.uk/path/to/protected/page.php?logout=1">Logout</a>

any ideas

Thanks
Logged
designerguy
Newbie
*
Posts: 2


« Reply #32 on: January 31, 2010, 06:35:22 AM »

I saw where someone else asked about this, but never saw an answer.  If there any way to get this to work with Apple Safari? When I logout with Safari, I'm able to log back in even after closing the browser which is a pretty bad security issue for me.  I even tried emptying Safari's cache & history and quiting it again and I was still able to get in without a password.

I followed all the instructions, but Safari gets in.  Works perfect with Firefox though.
Logged
designerguy
Newbie
*
Posts: 2


« Reply #33 on: February 03, 2010, 06:50:38 AM »

Oh man, I just tested Firefox in Win XP instead of Mac, and Firefox doesn't log out either.  I'm getting pretty sketched out with this.  Not secure on public computers at all.
Logged
zubrag
Administrator
Hero Member
*****
Posts: 787


WWW
« Reply #34 on: February 04, 2010, 02:28:35 PM »

On public computer, i would suggest clearing cookies before you leave.
Logged
Kara
Newbie
*
Posts: 7


« Reply #35 on: February 10, 2010, 03:47:57 AM »

I'm now getting this error on my pages when I click the logout link:

Warning: Cannot modify header information - headers already sent by (output started at /home/cro4912/public_html/password_protect.php:1) in /home/cro4912/public_html/password_protect.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/cro4912/public_html/password_protect.php:1) in /home/cro4912/public_html/password_protect.php on line 89
Logged
cws1
Newbie
*
Posts: 2


« Reply #36 on: March 22, 2010, 10:33:05 AM »

The simple password protect script is nice and easy. Thanks for your contribution. However, the logout does not actually work, so for any serious purpose, this script is not safe to use. From reading this forum I can see it has been a problem for a long time.
Logout failure:
The symptoms of the bug are: upon clicking the logout link, the script appears to go through the logout process and eventually redirects the user to the target page according to the script variable set. But, upon clicking the back button (once in FF and twice in IE) it brings the user back to the protected page requiring no password. (char limit... read next post)


Logged
cws1
Newbie
*
Posts: 2


« Reply #37 on: March 22, 2010, 10:35:13 AM »

and, while on the protected page (after back button) refreshing (F5) or reloading (ctrl+F5) has no effect. The user remains logged in. and, if there are several pages protected, one can regain access to all pages in with the "protection" without login.

and, even after closing the browser with the protected page open, the user can reopen browser and go right back into protected page without a password.
Logged
Traymond
Newbie
*
Posts: 2


« Reply #38 on: June 14, 2010, 09:15:45 PM »

See if this solves your problems

Step 1.

make changes that fit your setup.  copy and paste this into the file you are protecting where you want it to show up on the page.  Make sure it is all on one line after you paste it.

<a href="http://www.yourwebsite.com/vault/secure_data.php?logout=1" onclick="javascript:location.replace(this.href); event.returnValue=false; ">Logout</a>



Step 2.

open the password_protected.php file

Look for the header on the next line. it is not far down from the top of the password_protect.php file.

##################################################################
#  SETTINGS START
##################################################################

You only need to make changes to the following sections. There are other sections in there but they require no changes.

1. change the web address to where you want to redirect the user too when they logout.
    Note: It does not matter what web address  you direct them too.   


// User will be redirected to this page after logout
define('LOGOUT_URL', 'http://www.example.com');       <---------  change to the web address you want to redirect the user to.


2  make sure the TIMEOUT_MINUTES'   is  .01       by default it is usually 0


// time out after NN minutes of inactivity. Set to 0 to not timeout
define('TIMEOUT_MINUTES', .01);  ,    <-------------  make sure this is .01



3. make sure TIME_OUT_ACTIVITY is set  to false    by default it is usually true

// This parameter is only useful when TIMEOUT_MINUTES is not zero
// true - timeout time from last activity, false - timeout time from login
define('TIMEOUT_CHECK_ACTIVITY', false);   <------   Make sure this is set this to false



Save your changes and upload your new PASSWORD_PROTECT.PHP  file to your webserver.

Logged
tux
Newbie
*
Posts: 1


« Reply #39 on: June 18, 2010, 07:50:52 PM »

Hello,
Thank you such a great script!

I have a quick question, in Google Chrome, when the user goes to the site "www.example.php," the script works perfectly.  However, if the user goes to "example.php" the page opens up without prompting for a password, although the logout link appears and works, i.e. it sends the user to the link specified, but doesn't really log out the user.  Again, the script works perfectly if one prefaces the web address with "www".

This is not an issue with the Safari browser.

Thanks for your help!

Tux
Logged
pavel89l
Newbie
*
Posts: 1


« Reply #40 on: July 20, 2010, 04:18:21 PM »

I love this script, but I have an error when I log out.

I get the same error about lines 89 and 90....

here's the code that was posted earlier by Kara.

Warning: Cannot modify header information - headers already sent by (output started at /home/cro4912/public_html/password_protect.php:1) in /home/cro4912/public_html/password_protect.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/cro4912/public_html/password_protect.php:1) in /home/cro4912/public_html/password_protect.php on line 89
Logged
Kimball342
Newbie
*
Posts: 11


« Reply #41 on: August 12, 2010, 12:26:33 AM »

Hi. You do not need to add code. Protected page will logout automatically when "logout=1" parameter passed (as logout functionality is implemented in protection script).
Logged
Pages: 1 2 [3] 4
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC