|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75695 LDAP & OpenSSL Libdir Compile Bug
Submitted: 2017-12-15 23:57 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: me at nbishop dot name Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.1.12 OS: Linux (Fedora)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: me at nbishop dot name
New email:
PHP Version: OS:


 [2017-12-15 23:57 UTC] me at nbishop dot name
This started out at first as just a bug with compiling PHP w/ a compiled OpenSSL but has since turned into what looks like some configure oddities with the way --with-libdir values are attempted to be used.

1) When trying to use a compiled OpenSSL (not-packaged), PHP attempts to use a weird combination of $PHP_OPENSSL_DIR/$PHP_LIB_DIR (see line 2369 of acinclude.m4).  What it should likely be doing is using $PHP_LIB_DIR alone as defined by --with-libdir.  An alternative solution would be to restore the old --with-openssl-libs switch that existed < PHP7 versions.

2) When trying to implement ldap support (--with-ldap), another issue is encountered relative to --with-libdir.  If no directory is specified with the ldap switch, then it appears to try and use a hardcoded reference of /usr/$PHP_LIB_DIR which results in it looking literally in /usr//usr/local/lib64 for example.  Unfortunately specifying a directory does not really resolve it, with the openldap package it installs to /usr/lib64, so specifying --with-ldap=/usr/lib64 causes it to be unable to see the required headers (under /usr/local), and obviously using /usr/local as the path lets it see the headers but not the actual libs.

As far as I can tell these issues are present from the start of PHP 7.0 to the current 7.2 code branch and likely would impact any linux distro environment.

There may also be other ones, I did not test -all- switches, just the ones I needed in this case.

I've attached a patch file that 'quick-fixes' the relevant .m4 conf files (and passed `make test`).  The OpenSSL section is fairly straight forward imo, but I likely made a mess of the LDAP attempt so anyone wants to critique and improve that one please do lol.

If the patch file looks okay to others, I'll do a pull request on github.


ldap-openssl-libdir.patch (last revision 2017-12-16 00:02 UTC by me at nbishop dot name)

Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 04:03:36 2021 UTC