List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:August 7 1999 4:27am
Subject:slight trouble with mod_auth_mysql
View as plain text  
Hi, I'm trying to use mod_auth_mysql and can't seem to get it to work.
Actually it seemed to work a couple times with the default database as described
on the mod_auth_mysql page, however it doesn't seem to work at all now?

First, do I NEED the group stuff?
Auth_MySQL_Group_Table [group_table_name]
Auth_MySQL_Group_Field [group_field_name]

I'm not using them at the moment.

I have this in my httpd.conf file:
<Directory /www/html/demos/private>
  Auth_MySQL_Encryption_Types   Plaintext Crypt_DES MySQL
  Auth_MySQL_DB                 company_contact
  Auth_MySQL_Password_Table     Contact_Table
  Auth_MySQL_Username_Field     contact_fullname
  Auth_MySQL_Password_Field     contact_password
  AuthName                      "Private Demos"
  AuthType                      Basic
  require                       valid-user

Does the order of those directives matter?

# mysqladmin create company_contact

CREATE TABLE Contact_Table (
   contact_id int(10) DEFAULT '0' NOT NULL auto_increment PRIMARY KEY,
   contact_fullname char(30) NOT NULL,
   contact_password char(20) NOT NULL,
   contact_company char(30) NOT NULL,
   contact_timestamp timestamp(8),
   contact_visit_counter tinyint(3) DEFAULT '0' NOT NULL,
   INDEX (contact_password),
   INDEX (contact_fullname)

Does it matter that the password is not a primary key? I'd rather not if that's

The passwords should be in plaintext for easier administration in this section
however I did try the standard htpasswd format as well from another .htaccess I
was previously using.

| contact_id | contact_fullname | contact_password | contact_company |
|          6 | Daevid           | 1234             | someco          |
|          9 | dae51d           | 4dja7Xy0k0tI.    | The Matrix      |

Will I know what username and password the user entered into the dialog box to
be authorized?
I'll need that to give them access to specific parts of the site below this and
increment their counter, etc ...
that is, will these values work?
      echo "Hello $PHP_AUTH_USER.<P>";
      echo "You entered $PHP_AUTH_PW as your password.<P>";

slight trouble with mod_auth_mysqlDaevid Vincent7 Aug