Bug 5097

Summary: php is missing LDAP support
Product: [Retired] Red Hat Raw Hide Reporter: carenas
Component: mod_php3Assignee: Preston Brown <pbrown>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-09-24 23:20:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description carenas 1999-09-13 04:22:27 UTC
php is missing LDAP support, but could be easily added

adding the following tags where is needed on spec and making
a small configuration patch like php-3.0.12-config.patch is
all what is needed

-- add this patch to source as php-3.0.12-ldap.patch --
--- php-3.0.12/php3.ini-dist.ldap
+++ php-3.0.12/php3.ini-dist
@@ -115,6 +115,7 @@
 ;UNIX Extensions
 ;extension=pgsql.so
 ;extension=imap.so
+;extension=ldap.so

 ;;;;;;;;;;;;;;;;;;;
 ; Module Settings ;
-------------------------------------------------------

-- add to spec --
Patch5:    php-3.0.12-ldap.patch

%package ldap
Group: System Environment/Daemons
Requires: php
BuildPrereq: openldap-devel
Summary: LDAP module for PHP3

%description ldap
This is a dynamic shared object (DSO) for Apache that will
add LDAP support to PHP3.  If you need to have LDAP support
for PHP3 applications, you will need to install this package
in addition to the main php package.

%prep
%patch5 -p1 -b .ldap

%build
# LDAP module
perl -pi -e 's/HAVE_LDAP 0/HAVE_LDAP 1/g' config.h
gcc -shared -fPIC -DCOMPILE_DL=1 -I. -I/usr/include/apache \
        -o ldap.so ./functions/ldap.c -lldap -llber -lc

%install
install -m 755 -s ldap.so $RPM_BUILD_ROOT/usr/lib/apache

%post ldap
perl -pi -e 's|^;extension=ldap.so|extension=ldap.so|g'
/etc/httpd/php3.ini

%postun ldap
if [ $1 = 0 ]; then
  perl -pi -e 's|^extension=ldap.so|;extension=ldap.so|g'
/etc/httpd/php3.ini
fi

%files ldap
%defattr(-,root,root)
/usr/lib/apache/ldap.so

----------------

Comment 1 Preston Brown 1999-09-24 23:20:59 UTC
added in 3.0.12-5.