Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache image can't utilize ldapauth addon because container lacks libldap2-dev #83

Closed
victort opened this issue Nov 13, 2019 · 4 comments · Fixed by #84
Closed

Apache image can't utilize ldapauth addon because container lacks libldap2-dev #83

victort opened this issue Nov 13, 2019 · 4 comments · Fixed by #84
Assignees
Labels
Bug Something isn't working

Comments

@victort
Copy link

victort commented Nov 13, 2019

friendica.log renders:

2019-11-12 10:25:08 index [INFO]: ldapauth: not configured or missing php-ldap module [] - {"file":"ldapauth.php","line":105,"function":"ldapauth_authenticate","uid":"3c55bf","process_id":39}

for example, after my trying to fill out and run an addon.config.php with an ldapauth block.

@victort victort changed the title Can't utilize ldapauth addon because container lacks php7.3-ldap Apache image can't utilize ldapauth addon because container lacks php7.3-ldap Nov 13, 2019
@MrPetovan MrPetovan added the Bug Something isn't working label Nov 13, 2019
@victort
Copy link
Author

victort commented Nov 14, 2019

actually, it looks like it might be libldap2-dev that's missing, because

root@4a678cd31a50:/var/www/html# docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/

fails during configure on

configure: error: Cannot find ldap.h

but succeeds when libldap2-dev is present. I'm still trying to work out if it's both the php7.3-ldap and libldap2-dev packages are required, or just the latter. stay tuned.

@victort victort changed the title Apache image can't utilize ldapauth addon because container lacks php7.3-ldap Apache image can't utilize ldapauth addon because container lacks libldap2-dev Nov 14, 2019
@victort
Copy link
Author

victort commented Nov 14, 2019

so, I get ldap to appear among the PHP extensions in phpinfo() now, with the following in my Dockerfile (which is really just wrapping friendica/server with my (among other things) /var/www/html/config/addon.config.php so i can LDAP),

## First fix available sources
RUN rm -rf /etc/apt/preferences.d/*

## compensate for missing php stuff
RUN apt-get update ; apt-get install --no-install-recommends -y libldap2-dev
RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/; docker-php-ext-install ldap

...I'm not sure if i still have to empty out /etc/apt/preferences.d for libldap2-dev to be visible to the package manager, I guess I'll test that next.

@nupplaphil
Copy link
Collaborator

Ah thx .. I'll have a look!

@nupplaphil
Copy link
Collaborator

You don't have to add the dependency by your own. I think it's tiny enough to add it to the base image.

So I added them -> see #84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants