This version uses different parameters to the original. You should check
your documentation for the module (which might be at
/usr/share/doc/mod_auth_mysql.txt)
This version of mod_auth_mysql does not require the Auth_MySQL_Info
parameter to be declared in the server's httpd.conf file and also the
parameter names that are declared in the .htaccess file are slightly
different from the original. For example instead of Auth_MySQL_Host it uses
AuthMySQLHost. An example of a .htaccess file using the Invernia
mod_auth_mysql would be ...
AuthName "Members Area"
AuthType Basic
AuthMySQLHost localhost
AuthMySQLUser mysqlusername
AuthMySQLPassword mysqlpassword
AuthMySQLDB database
AuthMySQLUserTable users
AuthMySQLCryptedPasswords On
AuthMySQLAuthoritative Off
AuthMySQLNoPasswd Off
AuthMySQLNameField username
AuthMySQLPasswordField password
require valid-user
From: Ken Romero (kromero) [mailto:kromero@cisco.com]
Sent: 24 January 2003 16:29
To: 'engarde-users@engardelinux.org'
Subject: RE: [EnGarde] mod_auth_mysql Configuration
All,
I am having trouble configuring the mod_auth_mysql module for apache.
I have downloaded and installed an RPM from the www.rmpfind.net
archives for Engarde (mod_auth_mysql-1.11-1.0.100.i686.rpm).
I have cofigured the appropriate lines into my
/etc/httpd/conf/httpd.conf file....
LoadModule mysql_auth_module modules/mod_auth_mysql.so
AddModule mod_auth_mysql.c
Auth_MySQL_Info localhost root <passwd-snipped>
I have confirmed that the root username and password does provide me
successful access into the mysql monitor (see output)....
[root@www html]# mysql -hlocalhost -uroot -p
Enter password:<passwd-snipped>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 3.23.36
mysql>
When I attempt to restart the web server, I get the following
error....
Syntax error on line 137 of /etc/httpd/conf/httpd.conf:
Invalid command 'Auth_MySQL_Info', perhaps mis-spelled or defined by a
module not included in the server configuration
Whe I comment out the 'Auth_MySQL_Info' line in the
/etc/httpd/conf/httpd.conf file, I see that the web server *will* start
successfully. However the .htaccess file will cause an error to be
logged...
[root@www html]# tail ../logs/error_log
[Fri Jan 24 01:14:01 2003] [alert] [client 128.107.253.37]
/home/httpd/www.deepinthemoney.tzo.com-80/html/members/.htaccess:
Invalid command 'Auth_MySQL_DB', perhaps mis-spelled or defined by a
module not included in the server configuration
My .htaccess file looks like such....
AuthName "DeepInTheMoney.Com Members Only!"
AuthType Basic
Auth_MySQL_DB www_deepinthemoney_com
Auth_MySQL_Password_Table mysql_auth
Auth_MySQL_Username_Field username
Auth_MySQL_Password_Field password
Auth_MySQL_Empty_Passwords off
Auth_MySQL_Group_Table mysql_auth
Auth_MySQL_Group_Field status