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

php-ldap module not include #33

Open
snipking opened this issue Jul 6, 2020 · 1 comment · May be fixed by #34
Open

php-ldap module not include #33

snipking opened this issue Jul 6, 2020 · 1 comment · May be fixed by #34

Comments

@snipking
Copy link

snipking commented Jul 6, 2020

Config LDAP Auth and login shows

Call to undefined function ldap_connect()

And php -m shows no ldap module.

Can fix with

RUN \
    apt-get update && \
    apt-get install libldap2-dev -y && \
    rm -rf /var/lib/apt/lists/* && \
    docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
    docker-php-ext-install ldap
@davidbarratt
Copy link
Contributor

I can't find the requirement in the phabricator documentation anywhere, maybe it's missing from their documentation?

I did find the use in the source code:
https://github.com/phacility/phabricator/blob/05eb16d6de51f94966c3299332a5938cea613c5e/src/applications/auth/management/PhabricatorAuthManagementLDAPWorkflow.php#L31

Maybe we could add it to this section (of all three Dockerfiles)?

phabricator/Dockerfile

Lines 23 to 70 in 78cb118

# install the PHP extensions we need
RUN set -ex; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
fi; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libcurl4-gnutls-dev \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-freetype-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
mbstring \
iconv \
mysqli \
curl \
pcntl \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*

Would you mind creating a PR?

@snipking snipking linked a pull request Jul 8, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants