Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 567 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

.htaccess and passwd protection

Thread title: .htaccess and passwd protection
Closed Thread    
    Thread tools Search this thread Display Modes  
12-15-2006, 12:53 AM
#1
jeanmichel is offline jeanmichel
Status: I'm new around here
Join date: Oct 2006
Location:
Expertise:
Software:
 
Posts: 8
iTrader: 0 / 0%
 

jeanmichel is on a distinguished road

  Old  .htaccess and passwd protection

helloo

i'm starting to learn to play with the .htaccess file and just protected one of many directories on one of my sites with it.

But there is one thing i wonder; once you type in the username and password to get access to the directory, its like, there is no logout option.
If i leave the directory and then come back afterwards, it doesnt prompt me for the password anymore.

So, do i have to create php sessions with the .htaccess file? For how much time the door will stay open?

What's the best use of the .htaccess in a passwd protection circumstance?

Thanks

12-15-2006, 02:35 AM
#2
Jeff Andersen is offline Jeff Andersen
Status: Superstar
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 4,449
iTrader: 10 / 100%
 

Jeff Andersen is on a distinguished road

  Old

As far as I know if you're user .htaccess the only way to have it cleared is to shutdown the browser. If you're going to start using sessions/cookies then you might as well use a user database.

12-15-2006, 02:51 PM
#3
prasunsen is offline prasunsen
Status: Junior Member
Join date: Dec 2006
Location:
Expertise:
Software:
 
Posts: 52
iTrader: 0 / 0%
 

prasunsen is on a distinguished road

Send a message via ICQ to prasunsen

  Old

Actually the .htaccess authorization also expires, but I don't know after how much time and if this depends on the server. For sure there is no "logout" option as said above

12-16-2006, 07:17 AM
#4
jeanmichel is offline jeanmichel
Status: I'm new around here
Join date: Oct 2006
Location:
Expertise:
Software:
 
Posts: 8
iTrader: 0 / 0%
 

jeanmichel is on a distinguished road

  Old

I guess a better way would be, as jeff's suggestion, to use a database.
Of course, i could program myself a couple of php scripts from scratch serving that purpose but do you know guys where would i find some snippets out there, already written, that would approximately do that; insert new user and their respective password in a database table?
...i know its quite simple, maybe the time to find it on the web would be as much as the time needed to write it from scratch...

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed