25591480 PHP fails to return LDAP attributes after installing SRU 11.3.16.3.0 s11u3-sru
authorCraig Mohrman <craig.mohrman@oracle.com>
Tue, 21 Mar 2017 13:15:18 -0700
branchs11u3-sru
changeset 7784 531789214c7c
parent 7781 8314c1faa159
child 7787 26bcbec7afce
25591480 PHP fails to return LDAP attributes after installing SRU 11.3.16.3.0
components/php/php56/Makefile
components/php/php56/patches/openldap.patch
--- a/components/php/php56/Makefile	Mon Mar 20 04:53:52 2017 -0700
+++ b/components/php/php56/Makefile	Tue Mar 21 13:15:18 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../../make-rules/shared-macros.mk
@@ -50,7 +50,7 @@
 
 # We patch configure.in to allow building just modules (no SAPI's), e.g. intl.
 # Since we are sharing the source, regenerate configure here.
-COMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoconf) ;
+COMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoreconf) ;
 
 ASLR_MODE = $(ASLR_ENABLE)
 
@@ -74,10 +74,12 @@
 CONFIGURE_OPTIONS +=	--with-pear=$(VARPHPDIR)/pear
 
 # Use openldap
-# This is good enough to fool configure
+CONFIGURE_ENV += LDAP_INCDIR=/usr/include/openldap
+CONFIGURE_ENV += LDAP_SHARED_LIBADD="-lldap_r"
 CPPFLAGS += -I$(USRINCDIR)/openldap
 LDFLAGS += -lldap_r
 # but ensure "make" gets the point
+COMPONENT_BUILD_ARGS += LDAP_INCDIR=/usr/include/openldap
 COMPONENT_BUILD_ARGS += LDAP_SHARED_LIBADD="-lldap_r"
 
 # Disable SSLv2 and SSLv3 for security reasons
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php/php56/patches/openldap.patch	Tue Mar 21 13:15:18 2017 -0700
@@ -0,0 +1,19 @@
+In house patch to tell php where the openldap headers live.
+Will offer to upstream.
+
+
+--- php-5.6.22/ext/ldap/config.m4-orig	2017-03-09 09:59:23.066024806 -0800
++++ php-5.6.22/ext/ldap/config.m4	2017-03-09 10:05:20.982432123 -0800
+@@ -3,7 +3,11 @@
+ dnl
+ 
+ AC_DEFUN([PHP_LDAP_CHECKS], [
+-  if test -f $1/include/ldap.h; then
++  if test -f /usr/include/openldap/ldap.h; then
++    LDAP_DIR=/usr
++    LDAP_INCDIR=/usr/include/openldap
++    LDAP_LIBDIR=/usr/$PHP_LIBDIR
++  elif test -f $1/include/ldap.h; then
+     LDAP_DIR=$1
+     LDAP_INCDIR=$1/include
+     LDAP_LIBDIR=$1/$PHP_LIBDIR