|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81538 --with-ldap=[DIR] appears to be getting ignored
Submitted: 2021-10-18 17:32 UTC Modified: 2021-10-20 09:03 UTC
From: fred5 at originsystems dot co dot za Assigned:
Status: Open Package: Compile Failure
PHP Version: 8.0.11 OS: CentOS 7.9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-10-18 17:32 UTC] fred5 at originsystems dot co dot za
My PHP configure continues to fail on IMAP.


./configure  --disable-all --prefix=/RootFolder/webserver/resources/php --bindir=/RootFolder/webserver/resources/php/bin --sbindir=/RootFolder/webserver/resources/php/sbin --with-config-file-path=/RootFolder/webserver/resources/php/lib/osDo-not-modify-this-php_ini --with-config-file-scan-dir=/RootFolder/webserver/configuration/php/ini --disable-debug --enable-opcache=shared --enable-huge-code-pages --enable-intl=shared --enable-ftp=shared --enable-session=shared --enable-xml=shared --with-apxs2=/RootFolder/webserver/resources/apache2/bin/apxs --with-layout=GNU --enable-filter=shared --with-zlib=shared --enable-simplexml=shared --enable-dom=shared --with-openssl=shared --with-readline=shared --with-iconv=shared --enable-phar=shared --enable-xmlwriter=shared --enable-xmlreader=shared --enable-bcmath=shared --with-bz2=shared --enable-calendar=shared --enable-ctype=shared --with-curl --enable-exif=shared --enable-fileinfo=shared --enable-ftp=shared --enable-gd --with-jpeg --with-webp --with-freetype --with-mysqli=shared --disable-phpdbg --disable-phpdbg-webhelper --enable-fpm=shared --with-fpm-systemd --with-fpm-acl --with-gettext=shared --with-libxml --with-imap-ssl=/DevRoot/temp/osWEB/build/openssl-3.0.0 --with-imap=/DevRoot/temp/osWEB/build/imap-2007f --with-ldap=/DevRoot/temp/osWEB/build/openldap-2.5.8 --with-ldap-sasl=/DevRoot/temp/osWEB/build/openldap-2.5.8 --with-kerberos --enable-posix=shared --enable-soap=shared --enable-sockets=shared --with-tidy=shared,/DevRoot/temp/osWEB/build/libtidy --enable-tokenizer=shared --with-xsl=shared --enable-mbstring=shared --with-zip --with-external-pcre
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu

There is no further output containing the text "ldap"

and the configure fails with this message:
checking whether build with IMAP works... configure: error: build test failed. Please check the config.log for details.

When I check the config.log the first reference I see to "ldap" is the following error:
/RootFolder/webserver/resources/library/libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/DevRoot/temp/osWEB/source/imap-2007f/c-client/osdep.c:337: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/bin/ld: warning:, needed by //usr/lib64/, may conflict with
/bin/ld: /RootFolder/webserver/resources/library/libc-client.a(osdep.o): undefined reference to symbol ''
//usr/lib64/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

It appears that even  though I have the following switch pointing at my compiled version of ldap

It is being ignored and the default old OS version is being referenced as follows
/bin/ld: warning:, needed by //usr/lib64/, may conflict with

I have looked inside the configure file and tried to debug the issue but it doesn't seem to even be reaching the location which looks relevant to me - shown here (I've tried to echo to a file after the first line but it never seems to get hit at all) 


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
$as_echo_n "checking for LDAP support... " >&6; }

# Check whether --with-ldap was given.
if test "${with_ldap+set}" = set; then :
  withval=$with_ldap; PHP_LDAP=$withval



I'm really struggling with this and would appreciate any help I can get - thanks!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-18 21:26 UTC] fred5 at originsystems dot co dot za
or should I be leaving imap out of the equation and replacing the functionality via curl?

(I ask this as imap2007f is super old and what I'm reading shows that people seem generally to feel it's dodo material)
 [2021-10-19 17:42 UTC] fred5 at originsystems dot co dot za
The reason openldap was never reached is I believe because imap was being processed first and failing.

I have disabled imap and the build is now working fine.

I would however really like to know how imap fits in to the PHP roadmap if at all.
 [2021-10-20 09:03 UTC]
> I would however really like to know how imap fits in to the PHP
> roadmap if at all.

See bug #78572 for some discussion on this topic.  For me, the
biggest blocker of unbundling the imap extension is that Windows
mail() tests using SMTP still require the imap extension to check
whether the mails have been properly received.  These could
probably be rewritten to use a fake SMTP server as part of the
test suite.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 10:01:28 2024 UTC