Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 16th, 2001, 04:05 AM
Bigsumo Bigsumo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 0 Bigsumo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
User Authentication and Individual Directories

I am wondering if there are any tutorials/canned scripts on the following issue:

I would like to use a user/pass login form that would both authenticate a user and place them into his or her own private directory on the web server. The server is running Apache 1.3.14, perl v5.005_03, PHP v4, and MySQL.

I have tried other "canned" scripts but they dump all the users into one generic "member's area". I'd like each user to have their own directory.

I am new to programming and am trying to learn... but reading thru code and trying to figure out what does what is a little overwhelming.

Thank you for any advice/suggestions!

Reply With Quote
  #2  
Old June 18th, 2001, 01:49 PM
mullaney mullaney is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 0 mullaney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Big,

There are many approaches to this problem. Here are a couple that come to mind.

1. Use the htaccess method to authenticate users.

Using this approach, after the user authenticates, you can watch for the environment variable $ENV{'REMOTE_USER'} from any cgi script to catch the username. Then, you can open their directory according to their username.

EX.
...
$userpath = "/path/to/directory/$ENV{'REMOTE_USER'}";
open (FILE, "$userpath/file_to_open");
...


2. Use a text file to hold username and passwords and directory info (if the directory locations don't follow a pattern).

Apply the same logic from above like so...

A. Authenticate user against character delimited file.
B. Set $userpath equal to value in file for the matched user's "home" directory.


I hope this helps. If you require more detail or specific blocks of code, please let me know what you will be trying to accomplish and any other details you can offer.

Bob

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > User Authentication and Individual Directories


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT