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

    Join Date
    Aug 1999
    Location
    Muenster, NRW, Germany
    Posts
    17
    Rep Power
    0
    Hi to everybody in this forum!

    Im searching for some genral tips on handling authentification for a mySql-DB
    via php.

    I´ve got to build a web-DB interface which should offer access to the DB depending on which user logs in (using username +
    password)

    I´ve used the auth header stuff for my own page and that works just fine. Question is:
    Using the $PHP_AUTH_USER and $PHP_AUTH_PW
    for the DB connections(as DB User & pass)means that mySql must have a user with the given values. If a new user should be added flush privileges must be started to update the user DB and this requires root access (something I don´t want to grant the client for security reasons).
    Does somebody know a better way?
    I thought aboout using a standard mySql-User and looking the $PHP_AUTH_USER & $PHP_AUTH_PW vars up in a seperate DB. Advantage would be that my client would be able to add new users, disadvantage would be that all users had the same priviliges.
    I´m not sure which is the best way so _please_ give me some advise...

    TIA
    Björn
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Denmark
    Posts
    7
    Rep Power
    0
    Why not just group users. Make a MySQL user for every usergroup. Then just assign a "real" user til a MySQL user. That way you can have a group of admins and a group of read-only users etc.

    ------------------
    --
    Anders
    webmaster@elffan.com

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo