View Issue Details

IDProjectCategoryView StatusLast Update
0000010Apache 2.x public2006-05-17 05:24
ReporterrgehrigAssigned Topsmedley 
PrioritynormalSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Product Versionv2.2.1 
Target VersionFixed in Version 
Summary0000010: mod_auth_mysql not working
DescriptionConfigured mod_auth_mysql module and set up database and table in MySQL and gave permissions for database for the mod_auth_musql user.

It does not give any error messages about mysql connectivity but appears to be trying to use non mysql auth.

Tried using .htaccess for the configuration as well as putting the config in httpd.conf, neither case worked.

If config stuff in .htaccess the the following error message in apache error_log

[Mon Apr 10 21:14:50 2006] [error] [client 192.168.0.61] client denied by server configuration: D:/gdb_web/gdb_int/.htaccess

If config stuff in httpd.conf the following error messages

cfg_openfile() called with NULL filename
[Wed Apr 12 07:08:15 2006] [error] [client 192.168.0.61] (9)Bad file number: Could not open password file: (null)

See attached .htaccess file for what I tried.
Additional InformationConfig put into httpd.conf
<Directory "/gdb_web/gdb_int"> #Change this line to match your restricted access dir
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
 AuthType Basic
 AuthName "MySQL Testing"
 AuthMySQLPwEncryption crypt
 AuthMySQLHost mysql-srv.com #change the following lines to match your setup
 AuthMySQLDB http_auth
 AuthMySQLUser htauth
 AuthMySQLPassword htauth
 AuthMySQLPort 3306
 AuthMySQLUserTable user_info
 AuthMySQLNameField user_name
 AuthMySQLPasswordField user_passwd #last line of possible changes
 AuthMySQLEnable On
 require valid-user
</Directory>
TagsNo tags attached.

Activities

2006-04-17 11:35

 

.htaccess (266 bytes)

psmedley

2006-04-20 20:11

administrator   ~0000020

I think at least half of the problem here is that either I'm doing something wrong, or there's a problem with .htaccess files

I tried something here to restrict access to a section of the site and it didn't work. Must get my Apache2 book out and try and understand if it's a configuration error on my part, or a problem with my port.

mikkle

2006-05-17 05:24

reporter   ~0000080

Hey,

Just a note to say that I can confirm this issue.
It seems that ModAuthMySQL is actually never called.
If "AuthUserFile" is not present in the auth-config (.htaccess or in httpd.conf) This error gets logged:
---
[Tue May 16 20:17:19 2006] [error] [client 10.22.42.253] (9)Bad file number: Could not open password file: (null)
---
and if "AuthUserFile" IS present, the file stated there gets htpasswd-queried.

I don't believe there's an Apache configuration error (sorry).
The config presented by "rgehrig" should be correct. - It's more or less straight out of the ModAuthMysql documentation.
I used a very similar conf in my setup.

Issue History

Date Modified Username Field Change
2006-04-17 11:35 rgehrig New Issue
2006-04-17 11:35 rgehrig File Added: .htaccess
2006-04-20 20:11 psmedley Note Added: 0000020
2006-04-22 13:11 psmedley Status new => assigned
2006-04-22 13:11 psmedley Assigned To => psmedley
2006-05-17 05:24 mikkle Note Added: 0000080