View Issue Details

IDProjectCategoryView StatusLast Update
0000010Apache 2.x public2022-09-24 01:12
Reporterrgehrig Assigned Topsmedley  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionno change required 
Product Versionv2.2.1 
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.
Attached Files
.htaccess (266 bytes)

Activities

psmedley

2006-04-20 10:41

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-16 19:54

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.

psmedley

2022-09-24 01:12

administrator   ~0004573

I don't believe this is relevant anymore given we've moved to apache 2.4.x

Issue History

Date Modified Username Field Change
2006-04-17 02:05 rgehrig New Issue
2006-04-17 02:05 rgehrig File Added: .htaccess
2006-04-20 10:41 psmedley Note Added: 0000020
2006-04-22 03:41 psmedley Status new => assigned
2006-04-22 03:41 psmedley Assigned To => psmedley
2006-05-16 19:54 mikkle Note Added: 0000080
2022-09-24 01:12 psmedley Status assigned => resolved
2022-09-24 01:12 psmedley Resolution open => no change required
2022-09-24 01:12 psmedley Note Added: 0004573