mtsql users htaccess with salt
I have been looking for some time now after a function I wanted to add to my site.
in my website I got a forum where i have some users, and I wanted to add restrictions on my site so users from the forum can get to a portion of my site using thier login and password they created from the forum, so I tryed htaccess, but get a few problems.
the password stored in mysql is using salt, so I need htaccess to get that too and i found something like this:
AuthName "MySQL Testing"
AuthType Basic
AuthMySQLEnable On
AuthMySQLHost localhost
AuthMySQLPort 3306
AuthMySQLUser (a user with access to the database)
AuthMySQLPassword (the database users password)
AuthMySQLDB (database name)
AuthMySQLUserTable (the members table)
AuthMySQLNameField member_name
AuthMySQLPasswordField passwd
AuthMySQLNoPasswd Off
AuthMySQLPwEncryption crypt
AuthMySQLSaltField password_salt
AuthMySQLKeepAlive off
AuthMySQLAuthoritative on
require valid-user
the problem was that I just got an internal server error, I then found another one that looked like this:
AuthName "MySQL Testing"
AuthType Basic
Auth_MySQL On
Auth_MySQL_Authoritative on
Auth_MySQL_Username (a user with access to the database)
Auth_MySQL_Password (the database users password)
Auth_MySQL_Host localhost
Auth_MySQL_DB (database name)
Auth_MySQL_Password_Table (the members table)
Auth_MySQL_Empty_Passwords Off
Auth_MySQL_Encrypted_Passwords on
Auth_MySQL_Username_Field member_name
Auth_MySQL_Password_Field passwd
Auth_MySQL_Encryption_Types Plaintext Crypt_DES
require valid-user
But I can't find the salt code for this type, but I do get asked for a username and password.
apache2 version 2.2.22
mysql version 14.14 Distrib 5.5.22
There must be several ways to get the function I am looking for, I thought this was the easy one, so any way to make my htaccess to work or do I need another way to get my function?
|