httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent FAILLIE <>
Subject [users@httpd] Authentication agains database issue.
Date Mon, 25 Jun 2007 15:04:02 GMT
Dear all,

I running on an HP-UX 11.11 712 box, and I have
compiled apache 2.2.4 with GCC.
I have took mod_dbd.c from truck due to several bugs
in the version provided w/ 2.2.4.

I'm using the following configuration (it's only a
test up to now):

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch
IncludesNoExec Includes

AuthType Basic
AuthName "Test"
AuthBasicProvider dbd
Require valid-user
AuthDBDUserPWQuery "select passwd from test.comptes
where id = %s"

My database is the PostgreSQL 8.2.4, and test.comptes
tables as created as bellow :

CREATE TABLE test.comptes (
	passwd TEXT NOT NULL,
	max	bigint,
	admin boolean,
	superviseur boolean,
	status	TEXT,
	contact	TEXT

INSERT INTO test.comptes VALUES ('Test',
'1$Codv.WMAH7w', 1024, 'f', 'f', 1,

My problem is I have to enter 3 or 4 times my
credential each time apache is restarted, before being
accepted. (the user and password is saved in Firefox
password repository so I'm sure it's always the same
Each time, my error.log contains :

[Mon Jun 25 16:48:37 2007] [notice] Apache/2.2.4
(Unix) DAV/2 PHP/5.2.3 configured -- resuming normal
[Mon Jun 25 16:49:01 2007] [error] [client] user Test: authentic
ation failure for "/~laurent/": Password Mismatch
[Mon Jun 25 16:49:09 2007] [error] [client] user Test: authentic
ation failure for "/~laurent/": Password Mismatch

I did following tests :

- When I restart only apache (w/o restarting my
browser), credentials are again rejected 4 or 5 times

- I restart only my browser, my credential is
requested once (it makes sens as the browser doesn't
have them in memory anymore).

Based on that, it seems the problem is located inside
the authentication engine. And as it's perfectly
working when authenticating against flat file
(.htpasswd), we can said it's somewhere in the
authentication against database chain.

Any tips or helps.

best regards,


The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /
Quoi, des fautes d'orthographe! Pas possible ;-D.

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message