Web Hosting Talk







View Full Version : mysql_auth


davidb
11-16-2001, 12:42 PM
The control panel I run, I think installed this, it lists all the modules in apaches httpd.conf. The only problem is that it is missing the auth_mysql.conf file. I searched all over and just can not find an example. If anyone has an example of this file could they please post it. THank you

ffeingol
11-16-2001, 01:05 PM
Is this what you are looking for: http://www.cgi101.com/class/password/mod_auth_mysql.html?

Frank

davidb
11-16-2001, 04:54 PM
I do not think that is it, I already have that information setup. I really think I need the config file, but I have no idea what goes in it.

ffeingol
11-16-2001, 05:03 PM
What config file?

davidb
11-16-2001, 05:30 PM
auth_mysql.conf or some variation of that name

ffeingol
11-16-2001, 05:54 PM
Sorry, I must be missing something.

The "general" configuration stuff goes into your httpd.conf and the stuff to protect directories goes into a .htaccess file in that directory.

Frank

davidb
11-16-2001, 06:05 PM
Let me reask this to be more specific. I am running freevsd. With it came apache and whatnot preinstalled. In httpd.conf, I have this:

LoadModule mysql_auth_module /usr/lib/apache/mod_auth_mysql.so

lower

AddModule mod_auth_mysql.c

so it appears at least to me that mod auth mysql has been installed. Lower in the config I got:
#Include /etc/httpd/conf/auth_mysql/auth_mysql.conf

commented out initially because its not created. In the insructions for something I am working on, It says make sure auth_mysql.conf is configured.

In my Vhost I put
Auth_MySQL On

There is more, just no point in copying it. When I run apache I get

Syntax error on line 533 of /etc/httpd/conf/httpd.conf:
Invalid command 'Auth_MySQL', perhaps mis-spelled or defined by a module not included in the server configuration

Which more or less means it dosent think mod_auth_mysql is installed. Any ideas?

bitserve
11-16-2001, 11:39 PM
davidb,

Read the USAGE doc again. It's:

Auth_MYSQL on

not:

Auth_MySQL On

The "On" would probably work, but you need to use "MYSQL" instead of "MySQL". Inconsistency in the directives, I know.

If it still doesn't work, then the module probably isn't being loaded even though it appears to be.

As far as the #Include for the msyql.conf file, you can just include the directives that you need to configure the module in your httpd.conf file. No need to call an outside configuration file. But you can if you want.

Either way, you'll just need at least the following directive either in the include file or in the httpd.conf file:

Auth_MySQL_DB <database_name>

All the other directives have defaults, and can be left out as long as your table is named mysql_auth and your fields are named username, passwd, and groups.

davidb
11-17-2001, 11:24 AM
Problem Solved

mhale
11-25-2002, 12:20 AM
I am getting this too. I see the module is installed, and uncommented. I am using PLESK. The server has been restarted and anytime I try to use an MySql_auth command, it gives an error:

Invalid command 'Auth_MYSQL', perhaps mis-spelled or defined by a module not included in the server configuration