httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Johnson <>
Subject [users@httpd] Apache Module mod_authn_socache: AuthnCacheSOCache not allowed here (and other problems)
Date Mon, 11 Feb 2013 18:43:23 GMT

I'm attempting to configure Apache Module mod_authn_socache, but receive
a warning when Apache starts.

Server version: Apache/2.4.3 (Win32)
Server built:   Aug 18 2012 12:41:37

The documentation provides a sample configuration snippet ( ):

<Directory /usr/www/myhost/private>
    AuthType Basic
    AuthName "Cached Authentication Example"
    AuthBasicProvider socache dbd
    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    AuthnCacheProvideFor dbd
    AuthnCacheContext dbd-authn-example
    AuthnCacheSOCache dbm
    Require valid-user

I copied this snippet, almost verbatim, and upon startup, Apache complains:

AH00526: Syntax error on line 8 of C:/Program Files/apache/conf/auth.conf:
AuthnCacheSOCache not allowed here

The surrounding configuration directives are as follows:

------------------ httpd.conf ------------------
# Used for Database Authentication
LoadModule dbd_module modules/

# The Authentication provider module for databases
LoadModule authn_dbd_module modules/

# Credential caching module.
LoadModule authn_socache_module modules/
LoadModule socache_dbm_module modules/

# mod_dbd configuration
DBDriver odbc
DBDParams "DATASOURCE=ApacheMysqlAuth"
DBDMin  4
DBDKeep 8
DBDMax  20
DBDExptime 300
DBDPersist Off

DocumentRoot "C:/Users/Ben/Documents/Apache"

<Directory "C:/Users/Ben/Documents/Apache">
  Options -Indexes +FollowSymLinks
  AllowOverride All

  Include conf/auth.conf

------------------ auth.conf -------------------
  AuthType Basic
  AuthName "Please Authenticate"
  AuthBasicProvider socache dbd
  # mod_authn_dbd SQL query to authenticate a user.
  AuthDBDUserPWQuery "SELECT CONCAT('{SHA}', `password`) FROM `web_user`
WHERE `username` = %s"
  AuthnCacheProvideFor dbd
  AuthnCacheContext web_user
  AuthnCacheSOCache dbm
  Require valid-user

It seems that the example snippet is incorrect, because the above-cited
manual page states that the AuthnCacheSOCache directive's Context is
"server config":

server config
    This means that the directive may be used in the server
configuration files (e.g., httpd.conf), but not within any <VirtualHost>
or <Directory> containers. *It is not allowed in .htaccess files at all*
[emphasis mine].

If I move this directive into the "server config" scope (e.g., place it
just below the "DBDPersist" line in the snippet I shared above), Apache
starts without issue.

If this is an error in the documentation, I'm happy to submit a note on
the relevant manual page URL.

Unfortunately, even though Apache starts, it crashes shortly after I
begin to browse a simple PHP website on the server. Messages like the
following are logged before the *child* thread terminates (the parent
process seems to be unaffected):

I noticed that entries are written to the Windows Application Log when
this occurs. I noticed further that the messages vary with respect to
the faulting module (DLL).

Here, the faulting module is libapr-1.dll:

Faulting application name: httpd.exe, version:, time stamp:
Faulting module name: libapr-1.dll, version:, time stamp: 0x502f7152
Exception code: 0xc0000005
Fault offset: 0x00008580
Faulting process id: 0xa10
Faulting application start time: 0x01ce0882c835495a
Faulting application path: C:\Program Files\apache\bin\httpd.exe
Faulting module path: C:\Program Files\apache\bin\libapr-1.dll
Report Id: 13f6ae1b-7476-11e2-8f91-002522bf2ce4

And here, the faulting module is libapr-1.dll:

Faulting application name: httpd.exe, version:, time stamp:
Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp:
Exception code: 0xc0000374
Fault offset: 0x000ce6c3
Faulting process id: 0x9d8
Faulting application start time: 0x01ce088317abca07
Faulting application path: C:\Program Files\apache\bin\httpd.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: 6edebb8d-7476-11e2-8f91-002522bf2ce4

It seems that these log entries are from "separate crashes"; that is,
they were logged a few minutes apart.

If I repeat this process, the messages alternate between these two DLLs.

I'd be grateful for any assistance.

Thank you,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message