14, February 2012

Logout?? - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Logout??
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Logout??  (Read 1403 times)
Bill Cosby is my Father
*
Posts: 4
28 credits
Members referred : 0


« on: Mar 10, 2009, 08:32:19 am »

Hi

I just installed this class, but I have a few questions.

1.
I've made a logout file named logout.php. I looks like this

Code:
require_once "laccess.class.php";
$user = new flexibleAccess();

if(!$user->is_loaded()) {
   header ("Location: login.php");
};

$user->logout("../");

But why is the user not logged out when this script has ran?

2.
Is this class same strength as .htaccess? (Can I use this class only, and not be afraid about abuse)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Mar 10, 2009, 08:40:29 am »

.htaccess is needed to protect complete directories (for example one with images)

A session based authentication protects only scripts or pages


Last blog : A new Wordpress theme for our blog
Bill Cosby is my Father
*
Posts: 4
28 credits
Members referred : 0


« Reply #2 on: Mar 10, 2009, 08:50:27 am »

Hi Olaf

Thank you for your fast reply. I know .htaccess if used for protection of entire dirs. However many people use .htaccess for scripts as it should be "more secure".

I think I will use both in my admin environment. .htaccess for the entire folder incl. doc, pics ect. and phpLoginClass for permission

About the logout, maybe you have an example that works?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Mar 10, 2009, 08:55:18 am »

Hi,

the script is not written by me Wink (I have my own class)

.htaccess is different from session based authentication, protecting a directory its also protected against other linux user for example.
Sessions are safe too, if the server is well protected.

Most servers doesn't support a database based user management for .htaccess based protection

so you're fine with this kind of authentication


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #4 on: Mar 11, 2009, 09:30:36 am »

Hi groyk, I am the author of php user class so maybe I can help.

The only thing that is wrong about your code is the ../ which should be a url (this will be passed to header(location) ). Of course this have nothing to do with the reason that you are not logged off.

The problem has to do with your session settings. I haven't find yet what exactly causes this problem but I've seen this before. But in a production environment with a real domain always work fine.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Bill Cosby is my Father
*
Posts: 4
28 credits
Members referred : 0


« Reply #5 on: Mar 11, 2009, 09:42:36 am »

But this is production environment!
Anythink works fine if I change "var $remTime = 2592000;" to "var $remTime = 1;"
Chicken-run Manager
*
Posts: 9
70 credits
Members referred : 0


« Reply #6 on: Jun 10, 2010, 04:18:09 pm »

Just look at:

http : // www . webdigity.com/index.php/topic,10106.0.Logout+doesn%27t+work+with+%26quot%3Bremember+me%26quot%3B.html

best regards,
dobberph
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=8575
Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Logout??
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 11:37:55 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.