# [SOLVED] apache2 and mod_auth_ldap: Can't locate API module

## ty

I' m having a problem with apache2 and mod_auth_ldap: 

if MOD_AUTH_LDAP is set in /etc/conf.d/apache2 I get the following error as apache starts:

```
* Apache2 has detected a syntax error in your configuration files:

Syntax error on line 9 of /etc/apache2/modules.d/46_mod_ldap.conf:

Can't locate API module structure `auth_ldap_module' in file /usr/lib/apache2/modules/mod_auth_ldap.so: /usr/lib/apache2/modules/mod_auth_ldap.so: undefined symbol: auth_ldap_module

```

Without MOD_AUTH_LDAP everything works fine (php4, ssl, and straight up apache). The apache LDAP module and LDAP itself also works fine -- the machine is successfully using pam_ldap to auth users from a separate ldap server. Mysql is running successfully as well.

This is a recently built machine, with a pretty minimal install. 

Here are my use flags:

```
USE="-X apache2 bash-completion -arts -cups -gnome -gtk -gtk2 -java -kde -motif -qt ldap mysql x86"
```

Here is /etc/conf.d/apache2:

```
APACHE2_OPTS="-D DEFAULT_VHOST -D LDAP -D AUTH_LDAP"

KEEPENV="PATH"

```

I have a feeling this is some sort of typo on my part....any guesses?Last edited by ty on Sun Dec 04, 2005 11:16 am; edited 1 time in total

----------

## ty

I ended up comparing /etc/apache2/modules.d/46_mod_ldap.conf and 55_mod_auth_ldap.conf and noticed that 55_mod_auth_ldap.conf was trying to load:

```
 LoadModule mm_auth_ldap_module modules/mod_auth_ldap.so
```

I googled mm_auth_ldap_module  and found: http://www.muquit.com/muquit/software/mod_auth_ldap/README3.4.txt, which states that the module had been renamed from auth_ldap_module to mm_auth_ldap_module.

So, I commented out:

```
LoadModule auth_ldap_module   modules/mod_auth_ldap.so
```

in 46_mod_ldap.conf and everything works fine.

----------

## Akhouk

Thanks, that worked..

There is more information on this in the bug report

----------

