#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Location
    Finland
    Posts
    11
    Rep Power
    0
    How could I make the htpasswd -password file
    a MySQL table instead?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    7
    Rep Power
    0
    Well, you could use $PHP_AUTH_USER and $PHP_AUTH_PW.

    A detailed description of how it's done can be found on webmonkey.com. Look for PHP and Authorization.

    It'll also go into detail on cookies and sessions and how to pull the data from a sql database.

    However I have not yet figured how to protect directories behind your password protection. For example: www.domain.com/stuff/ is password protected, but if you go into www.domain.com/stuff/more more is not. I think you really have to work with sessions, hide all directories you are working in and check if the user was authorized on every maybe. Maybe through an included header.

    If anyone has a better solution, post it.
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,643
    Rep Power
    4492
    Look at the following url:
    http://apachetoday.com/news_story.ph...01-01-NW-LF-SW

    It tells you how to use mod_auth_mysql to do just what you want.

    ---John Holmes...

IMN logo majestic logo threadwatch logo seochat tools logo